[REBOL] Words, Bindings and Contexts. (7) Re:(2)

2000-07-26 Thread lmecir

Hi,

 HI Ladislav

 Very cool!  Use of simulated behavior (implemented in REBOL) is
a concise
 and precise way of expressing one's thoughts about the workings
of REBOL
 functions.  I find it much more informative than lengthy
attempts to
 describe in ordinary language how functions work.

 I have followed your Words, Bindings, and Contexts posts with
great
 interest.  I have learned a lot from your discussions and hope
to see more.
 Just a couple of quick questions:

 Can you say more about Dangerous Contexts?  For instance:
  f: func [x][return x]
  first :f
 == [x]
  type? first first :f
 == word!
 value? first first :f;REBOL crashes on any attempt to
examine the
 words in first :f

 Isn't this just a bug in REBOL?  Why does it not return an error
instead of
 crash?

 How about a modifying to sim-func to allow handling of /local
and
 refinements?  Then it would be a more complete model of func.

 Thank you again for sharing this excellent material.

 -Larry



1) I think, that every Rebol Context becomes Dangerous after being
Garbage Collected while still accessible, ie. Dangerous Contexts
may be just "Ghost Contexts" of once normal Rebol Contexts...
2) My intent was to describe the Rebol Context Handling and the
refinements would complicate the code beyond the limit I
considered acceptable. (BTW, if you consider Sim-function/spec as
containing all Function Context's Words ie. Arguments,
Refinements, Words specified as /local, everything holds, the
things that should be added are the examination of a call-path
used, a code to supply None as the value for respective Function
Context's Words, a code for spec parsing and the type checking
code.)
.




[REBOL] Words, Bindings and Contexts. (7) Re:(2)

2000-07-26 Thread deadzaphod


 l I see, that the fact, that my series didn't explain the
l behaviour of functions WRT Recursion and Binding is a flaw. l Here is 
the continuation (a model of the behaviour): [...]

I just want to say that I agree with this model. This is the closest 
representation of REBOL's function context handling IMHO.

OTOH, I'd like to understand why Carl considers the current behaviour a 
bug, while I was convinced this was by design.


Me too... I rather like the current behavior and have been writing scripts
that will probably break if it is changed.  I feel that the current STATIC
binding is an excellent feature, and even if it was a bug, it should be kept
and documented.

  - Cal ([EMAIL PROTECTED])

--

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com