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

[REBOL] Re: [bind] Patrick's pages ; using 'local ; using bind/copy

From: ptretter:charter at: 14-May-2003 20:13

Cool now lets ponder some more stuff like this: a: context [b: 1 c: 2] a/self: 3
>> probe a
make object! [ b: 1 c: 2 ]
>> a/self
== 3 You can assign a value to the objects /self refinement only after the object has been defined. Its not particularly apparent as you can see by the probe. So where is this value? It appears to be local to 'a but acts globally in some respects. now do: second a == [3 1 2] But yet it still acts an object You would obviously have to use this at your own risk as many functions might not function correctly. Paul Tretter ----- Original Message ----- From: "Marc Meurrens" <[rebol--meurrens--org]> To: <[rebol-list--rebol--com]> Cc: <[patrick--philipot--laposte--net]>; <[brett--codeconscious--com]>; <[g--santilli--tiscalinet--it]>; <[lmecir--mbox--vol--cz]>; <[team--qcp--be]> Sent: Wednesday, May 14, 2003 6:07 AM Subject: [REBOL] [bind] Patrick's pages ; using 'local ; using bind/copy
> Hello all, > Bonjour Patrick, > CC to the contributors of Patrick's pages on "bind", > > SUMMARY: visit http://rebol.mksa.net/bind-demo-1.r?help > > As a fresh new rebolutionar, I appreciate the help provided by the
communauty
> and a.o. I found in your pages all the explanations about this
mysterious/magic
> 'bind word... > Thanks... > > However, I have 2 small concerns regarding the "solution 3.1" of your > "exbind.html" page. > > 1. I think that it would be more neat to *allways* bind, > when binding your words to a local function context, > by referring to 'local (the pseudo refinement allways present...) rather > than relying > on a specific variable. It works also for functions without parameters... > > 2. Another issue is that your example use "bind" rather than "bind/copy" > Even if, in your small example, this is ok, I would suggest to emphasize > instead > the use of the /copy refinement. > > I think it would be stupid to create (on my own site) still another page > related to bind > just to publish these very small comments > but I suggest instead that, after discussion of my remarks, the "main" > pages on bind > (namely, Patrick's pages) should eventually be updated. > > Everything is detailled as explained in the header partially provided
below:
> REBOL [ > Url: http://rebol.mksa.net/bind-demo-1.r?help > Credits: { > 1. The REBOL dictionnary entry is at URL: > http://www.rebol.com/docs/words/wbind.html > > 2. A good introduction by Brett Handley can be found at: >
http://www.codeconscious.com/rebol/deeper-techniques.html#Usingcodeblocksand bind