[REBOL] Re: Context - code included- 2nd version
From: joel:neely:fedex at: 16-Sep-2001 3:14
Hi, Ladislav, Romano, et al,
Ladislav Mecir wrote:
...
> >
> > Is it a bug of to-word!, or i don't understand something?
>
> The problem is, that TO WORD! or MAKE WORD! can create some
> "artificial" words that the Rebol parser normally recognizes
> as different datatypes. We may consider that to be an
> "advantage" or a "disadvantage", but RT can claim it to be
> a feature, not a bug.
>
Might I suggest that this is not very different from
>> foo: load "42" == 42
>> type? foo == integer!
>> foo: to-decimal "42" == 42
>> type? foo == decimal!
>> foo: to-word "42" == 42
>> type? foo == word!
in that the "default" lexical scanning of a string involves
syntax rules which REBOL uses to determine what datatype the
string should be translated (LOADed) into. However, REBOL
gives us the ability to override those defaults and force
differently-typed values to be created instead.
-jn-
--
------------------------------------------------------------
Programming languages: compact, powerful, simple ...
Pick any two!
joel'dot'neely'at'fedex'dot'com