[REBOL] Re: x: :y question
From: joel:neely:fedex at: 4-Feb-2003 6:22
Hi, Bolek,
There's another way to be more "REBOLISH", IMHO...
Boleslav Brezovsky wrote:
> I can use something like:
>
> either x < 0 [a: a + 1][a: a - 1]
>
> so I thought I can make it more REBOLish ;), something like:
>
> op: either x < 0 [:+][:-]
> a: a op 1
>
a: a + either x < 0 [+1][-1]
or
a: a + pick [+1 -1] x < 0
refactors the selection as far into the expression as possible.
> But I cannot use even 'alias, becease aliased word cannot be changed :(
> and that's sad :((
>
> alias: either x < 0 ['+]['-] "op"
> a: a op 1
>
> This works only once, then I've got this error:
>
> ** Script Error: Alias word is already in use: op
> ** Near: alias either x < 1
>
Yes, this is *VERY* disappointing. Why there should be s difference
between ALIAS and SET is not clearly documented (at least to me), and
making ALIAS set in concrete is very user hostile.
-jn-