Using :word construct for refinement substitution does not work #134
-
|
In REBOL2, the following code is working fine and can be useful in many case: But in REBOL3 (3.19.0), this does throw an error: I am wondering whether this is by design... or a bug. Thank you for your feedback. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
It is by design.. the get-word in the path is now (like in Red) used for a different purpose.. e.g.: >> f: func[/a /b][? a ? b]
>> a: true b: false f/:a/:b
A is a logic of value: true
B is a none of value: none |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Also note, that Rebol2 probably does not work as you expect: >> f: func [/debug /info] [? debug ? info]
>> ref: 'debug f/:ref
DEBUG is a none of value: none ;<-------- still none!
INFO is a none of value: none |
Beta Was this translation helpful? Give feedback.
-
|
Thank you Oldes for your answer. I understand that it allows now conditional activation :) I found a construction that, although less elegant than path substitution, remains very much in the spirit of REBOL. if value? 'logger [
level: case [
debug 'debug
warning 'warning
error 'error
true 'info
]
log-path: to-path reduce ['log level]
code-block: compose [(log-path) (message)]
do bind code-block get 'logger
] |
Beta Was this translation helpful? Give feedback.

Also note, that Rebol2 probably does not work as you expect: