Hi Gabriele,
you wrote:
>[EMAIL PROTECTED] ha scritto:
>
>> (Right now, COMPOSE [()] == [unset], but this has
>> been changed so COMPOSE [()] = [])
>
>Jeff, this works already using COMPOSE [([])] !
>
The difference between your version, COMPOSE [([])], and Jeff's version,
COMPOSE [()] is as follows:
In your version, compose evaluates the empty block []. The empty block
evaluates to an empty block! Therefore compose returns an empty block.
In Jeff's version compose is evaluating nothing, because the parentheses
are empty. For REBOL nothing is unset!. In this situation the current REBOL
version returns unset. Example:
Using your approach:
>> compose [ ([print "Oops."]) ]
== [print "Oops."]
>>
That is not what we wanted. We wanted print Oops to be executed. That's why
we put it in parentheses. Leave away the inner block and you get Jeff's
version:
>> compose [ (print "Oops.") ]
Oops.
== [unset]
Now Oops is printed. However, compose returns a block containing unset.
What Jeff is announcing is that this behavior will change. In the futur
compose will not return unset.
Elan