[REBOL] Re: When is none not none?
From: moliad::gmail::com at: 30-Jul-2007 15:00
On 7/30/07, Ladislav Mecir <lmecir-mbox.vol.cz> wrote:
> Maxim Olivier-Adlhoch napsal(a):
> > Hi Jonathan,
> > Welcome to Rebol, hope you have a blast.
> > what you are experiencing is a subtlety of static run-time loading and
> > binding.
> Binding is slightly off-topic in this case, "static run-time" is a
> contradictio in adjecto.
hum... I didn't say static dynamic. the binding is static (its not a scope)
and is applied at run time, manually (as words are encountered during
execution of your application which is usually at load time), but can also
be while building objects, using bind, etc.
> some functions evaluate values and others do not. in this case,
> > compose loads a block and leaves everything within AS-IS.
> Wrong. The interpreter loads the block before evaluating the expression.
> Compose does not. (Do you want a proof?)
yes the interpreter itself does the loading. but the nuance was in the fact
that some functions need blocks which are bound and others dont care... I
should have been a bit more volubile I guess.. in this case compose does not
evaluate anything except parens.
> > so since the
> > interpreter has to put the none somewhere as something, it stays a word,
> > gets bound to the global definition of none, but isn't evaluated, so its
> > yet a none *value*.
> > I have had the same (I thought "strange", at the time) problems with the
> > true and false values, which have no lexical form which allows them to
> > explicitly cast as a datatype.
> Wrong. Here are the lexical forms of some Rebol values popularly thought
> not having lexical form:
not talking about serialized form. direct unserialized notation
an extension of what I was saying :-) , so we agree, if you want to be sure
the interpreter knows what none is.. use #[none] I use it often in my code.
for the recursive block loading, its a more complex example which will
illustrate what I meant, but I have no time right now :-( it might be
within a specific datatype (like object!), but at some point, one needs to
run 'DO on top of 'LOAD, whereas saving in serialised form alleviates this
thanks for adding precision to my words ;-)