[REBOL] Re: [data type conversion] question
From: moliad:aei:ca at: 29-Mar-2004 1:26
the problem with:
input-expr: [9/5 * 100 + 32]
parse/no-block-eval input-expr rules
is not in the parse, its when you try to create the block in the first place.
its trying to allocate memory for each item in itself, but when in encounters
the 9/5 it bails out.
I understand your point about parse.
I think that to say rebol truely supports dialects, we should be able to do
blk: make block! [9/5 * 100 + 32]
and rebol should be able to leave it as is in a form or another.
but because we cannot create our own datatypes, then there is no point in it,
because the parser will NEVER be able to convert the 9/5 into an actual value
excuse me for sounding critical here, but rebol should let us create datatypes,
for dialects in the least. I can't see why dialects should have to follow
rebol's syntax.... this is true for operator too.
isn't it the point of a dialect to be able to give a part of code its own
meaning... and The way I see it, part of that meaning lies in how the data
itself is represented.
using the example above, I could clearly see a dialect which accepts fractions
as a way to create decimal or integer values... maybe rebol could transform the
parts of a block it could not evaluate into a special string type. this could
be dialect! type.
Then we could parse it as a string series and create values out of it through a
dialect. This would allow us to create pseudo datatypes, by using normally
invalid rebol code.
just my two cents on the issue!