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

[REBOL] Re: object funnies

From: jelinem1:nationwide at: 19-Oct-2001 11:08

Then which way is "better" depends on who the intended audience is for REBOL: is it for those people who are twisted by over-exposure to languages with an affinity for local scoping, or for those who do not necessarily have much programming background and are not familiar with these implicit rules? - Michael (Don't be offended by the twisted reference; I'm just throwing back what I've caught from exposure to BASIC). Rod Gaither <[rgaither--triad--rr--com]> Sent by: [rebol-bounce--rebol--com] 10/19/01 09:38 AM Please respond to rebol-list T To: [rebol-list--rebol--com] cc: bcc: Subject: [REBOL] Re: object funnies
>This behavior is not intuitive? Surely you jest. Let me repeat just so I >really understand: you expected test2 and test3 to be locally defined >within the object's context? WHY did you expect that? That would be >INCONSISTENT with the rest of REBOL. I find the workings of REBOL to be >straight-forward and simple (the bugs are a different topic).
I've got to go with Graham on this one. Much as I like REBOL I find this departure from the typical "Scope" behavior of other languages counter intuitive - consistent as it may be within REBOL, which is another topic! :-) I wouldn't expect test2 and test3 to be in the object's context but I would expect them to be inside the function's context, inside the object's context. Not exposed at a global level just because they are inside a function. Just my .02, Rod.
>If you want a language which behaves more like C++ and Java, write a
REBOL
>dialect. > >- Michael Jelinek > >"Graham Chiu" <[gchiu--compkarori--co--nz]> > >Sent by: [rebol-bounce--rebol--com] > >10/19/01 12:21 PM >Please respond to rebol-list > >T >To: [rebol-list--rebol--com] >cc: > >bcc: >Subject: [REBOL] Re: object funnies > >On Fri, 19 Oct 2001 15:42:15 +1300 > "Andrew Martin" <[Al--Bri--xtra--co--nz]> wrote: >> Ladislav wrote: >> > Essentially, the MAKE searches the SPEC block (but not >> its subblocks) for >> set-words. That is why MAKE didn't find test2: and test3: >> in your example. >> >> I wonder if it would be a smart idea to make a scanner >> function that looks >> inside nested blocks for a object! spec and adds any >> set-word! to the start >> of the object's block, so that Graham's: > >I'm actually left wondering why RT chose to implement it in >this way. It's not intuitive, and nor is it discussed in >the online core docs. > >-- >Graham Chiu >-- >To unsubscribe from this list, please send an email to >[rebol-request--rebol--com] with "unsubscribe" in the >subject, without the quotes. > >-- >To unsubscribe from this list, please send an email to >[rebol-request--rebol--com] with "unsubscribe" in the >subject, without the quotes. >
Rod Gaither Oak Ridge, NC - USA [rgaither--triad--rr--com]