[REBOL] Re: Help me, Obi Reb Kenobi, you're my only hope!
From: lmecir:mbox:vol:cz at: 2-Sep-2002 8:58
no objection to your analyse. The fact, that the expression (first block2)
is illegal, while (error? first block2) isn't justifies my POV, that this
behaviour is a Rebol quirk. I want the interpreter/language to be less
aggressive (and faster and simpler and logical ...).
I am saying the same about the "exposition" of the UNSET! datatype, and I
was saying it about the "exposition" of the END! datatype, but the last one
Hi Ladislav and Gabriele,
> Your IS-REALLY-ERROR? function works for simple code like above, but,
> we cannot handle all possible cases, like e.g.:
> is-really-error? [1 first block2] ; == true
> (until errors will be "first class").
You are right about first class, but i think the code above gives the
result in the actual implementation of Rebol, because, for example, the
execution of the block:
[x: 1 first block2 x: 2]
is interrupted with a real error when the expression "first block2" is
executed, and "x: 2" is never executed:
do [x: 1 first block2 x: 2]
x ; == 1
so this is a real error in the actual Rebol implementation.
I think, indeed, that is not correct to return false with:
is-really-error? [first block2] ;==false
for the same reason. The function should answer to this question:
"the code fires an error when evaluated?"
and [first block2] fires an error when evaluated.
While the expression:
[type? first block2]
does not fires an error when evaluated
I think there is no difference from this point of view between
[first block] -> error
[first block2] -> error
but there is a difference between
[type? first block] -> error
[type? first block2] -> not error
And Try is enough to discern them.
Is-really-error? should be called:
and the blocks
can be accepted by many functions if not evaluated, but when you do it,
passing the result to a function, it always fires an error!
BTW, actual implementation fails with
is-really-error? first block2 ;== *** error!
but can be corrected.