You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebol LOAD function does not handle some apostrophe-prefixed words like: '/ '< '> '<= '>= '<>
The string-conversion idioms below can be frequently seen as a solution e.g. for dialect parsing purposes.
Disadvantages:
the obvious disadvantage of the above approach is that it converts string to word, which is generally not recommended when the word is known in advance. (I have seen some quirks to occur just because a string is used)
Therefore, I proposed the conversion function below and the subsequent idioms.
Advantages:
the new idioms are more readable
the code is faster
we get rid of the above mentioned quirks
Nevertheless, the word conversion idioms, although sufficient for the main purpose, don't solve the LOAD/MOLD issue below, so the only "clean" solution may be to use e.g. the #[lit-word! ...] syntax, or something similar.
You are trying to do a function workaround for a syntax problem. If the special-case words like those listed above aren't being recognized as lit-words, then the syntax scanner needs fixing. The function you propose shouldn't be added - the syntax needs fixing to make the function irrelevant.
Changed to a syntax issue, about the lit-word syntax problem.
As of alpha 97 all of the special-cased words with < or > in them are also accepted as lit-words (see #1461). Once lit-word versions of the / words are fixed (see #1477) we can dismiss this ticket.
Rebolbot commented on Nov 4, 2010:
Submitted by:Ladislav
in the core-tests suite
Rebolbot added the Test.written on Jan 12, 2016
The text was updated successfully, but these errors were encountered:
Submitted by: Ladislav
Rebol LOAD function does not handle some apostrophe-prefixed words like: '/ '< '> '<= '>= '<>
The string-conversion idioms below can be frequently seen as a solution e.g. for dialect parsing purposes.
Disadvantages:
Therefore, I proposed the conversion function below and the subsequent idioms.
Advantages:
Nevertheless, the word conversion idioms, although sufficient for the main purpose, don't solve the LOAD/MOLD issue below, so the only "clean" solution may be to use e.g. the #[lit-word! ...] syntax, or something similar.
Imported from: CureCode [ Version: alpha 94 Type: Issue Platform: All Category: Syntax Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1342
Comments:
Submitted by: BrianH
You are trying to do a function workaround for a syntax problem. If the special-case words like those listed above aren't being recognized as lit-words, then the syntax scanner needs fixing. The function you propose shouldn't be added - the syntax needs fixing to make the function irrelevant.
Changed to a syntax issue, about the lit-word syntax problem.
Submitted by: meijeru
See also tickets #1318, #1303, #1302.
Submitted by: BrianH
As of alpha 97 all of the special-cased words with < or > in them are also accepted as lit-words (see #1461). Once lit-word versions of the / words are fixed (see #1477) we can dismiss this ticket.
Submitted by: Ladislav
in the core-tests suite
The text was updated successfully, but these errors were encountered: