[REBOL] Re: relative expressions
From: ingo:h-o-h at: 1-Apr-2003 20:24
Hi Gabriele,
Gabriele Santilli wrote:
<...>
> Now imagine if we had types of values that were designed
> specifically for our problem domain. In such a case, you would not
> even need PARSE rules, but only something that makes the correct
> actions for these values. (Notice that in REBOL the "methods" for
> datatypes are called "actions". I wonder if this is a
> coincidence.) This would solve the reusability problem, because
> you just have to change the actions.
>
> However, you still don't have an easy way to "write down" the
> values; this is where PARSE comes. You design a dialect with the
> rules to parse it and translate it to a (sequence of) (custom)
> value(s). It is like VID, that just translates to a FACE, which is
> then used by View.
<...>
You are right, I wrote a webbased calendar using pliant. I wanted to be
able to write dates, but with some added sugar.
2003-01-01 would be the first of January 2003
01-01 First of january in whatever year
03/-1 the lasst of february in whatever year
and some more like this.
I missed my 'parse badly, but then I found the possibility to create new
types, along with the to/from string rules - in a way it's even more
powerfull then parse, because it is saved in the corresponding variable
_as_this_new_datatype_. Having real userdefinable datatypes on the Rebol
level would be great.
Kind regards,
Ingo