[REBOL] Re: object funnies
From: rgaither:triad:rr at: 19-Oct-2001 13:51
Hi Michael,
>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
I am in that twisted camp. :-)
I should warn you that I am not a "scripting" programmer and I do have
years
of exposure to several "old" languages. Perhaps my perspective
for REBOL is thus warped beyond repair. I would however like a language
to gently help me "improve" my programming by providing default behaviors
that aim towards robustness and reusability rather than towards chaos and
mayhem.
I am open to some examples that show a design value because of this
default behavior. I can only think of the problems such uncontrolled
references can lead to.
>necessarily have much programming background and are not familiar with
>these implicit rules?
Perhaps, but even that audience is going to struggle scaling up projects
if they don't learn something about encapsulation and defined interfaces.
Areas that this default function context behavior doesn't help with.
>- Michael
>
>(Don't be offended by the twisted reference; I'm just throwing back what
>I've caught from exposure to BASIC).
None taken, just a lively discussion.
As for a BASIC reference you would be in big trouble if that
was your base of judgement of other "old" languages! :-)
Thanks, Rod.
>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]
>
>--
>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]