Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Help me, Obi Reb Kenobi, you're my only hope!

From: lmecir:mbox:vol:cz at: 2-Sep-2002 8:58

Hi Romano, 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 got straightened. <<Romano>> Hi Ladislav and Gabriele,
> Your IS-REALLY-ERROR? function works for simple code like above, but,
AFAIK,
> 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 correct 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: can-some-functions-accept-this-argument-without-an-error? and the blocks [first block2] can be accepted by many functions if not evaluated, but when you do it, before 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. --- Ciao Romano