[REBOL] discrimination of comma (was: Re: "a REBOL dialect is usually limited...
From: rebol-list2::seznam::cz at: 12-Nov-2002 16:44
Hello rebol-list,
I think that Rebol is discriminating the comma becasue we can have a
dot as word! but not the comma as word!
>> type? load {.}
== word!
>> type? load {,}
** Syntax Error: Invalid word -- ,
** Near: (line 1) ,
Somone can argue, that it's because of the decimal! datatype in Rebol
(the only use of comma at this moment)
>> type? load {1,2}
== decimal!
>> type? load {,2}
== decimal!
>> load {.2}
== 0.2
And you can even write:
>> to-block {1,}
== [1]
But this I would consider as a reason to throw the invalid decimal
error because who writes decimals in such a way?
What if I have some input where I want user to write a decimal
walue 1.2 and I want to work with it:
>> to-block {1,2}
== [1]
but the user make a mistake and press space:
>> to-block {1, 2}
== [1 2]
The application don't know that it's bad value and in better way it
uses the first one.
So on one side we have error friendly decimals but not comma as a
word! And I ask you, why?
Oldes