On 1/20/2006, "Gary Wright" <at2002 / mac.com> wrote:

>
>On Jan 20, 2006, at 6:29 AM, Tom Allison wrote:
>> I realize that I've biasedly presented these two issues as problems
>> with the ruby language.  Well, I can do that because I'm too new to
>> know any better and I have yet to "see the light" on why this is a
>> good thing in contrast to all my experiences so far in life.  From
>> my background, SCOPE is a flaw and non-strict pragmas is a
>> condition to be aware of when tracking bugs.  But like I said, I'm
>> new.
>
>There is quite an influx of programmers into the Ruby community and
>to the
>extent there is quite a bit of 'teaching' occuring on this
>mailing list, I think it is great to get feedback like you provided.

Thank you.  I'm very pleased I haven't gotten hate mail for my voice. 
Very encouraging!!

>Some of what you say is particular to the book vs. Ruby.  But it is good
>to know what is confusing people.  Once you learn a concept it is
>hard to
>remember how you might have struggled to get there.

No doubt.  Try using the book as a reference for teaching another
person(s) and it probably becomes clearer.  This is similar to saying
out loud what you have written for a paper.  If it sounds good to the
voice, it's probably ok in writing.

>I'm curious if you could expand on the issue of 'scope' that you
>mentioned.
>Is it the lexical scoping of a block that surprised you or something
>else?

This:
Variable Scope, pages 105 through 107
"any new locals created (in while, until, for) will be available
afterward"
I've never seen anything like this.
Anything that is declared (or implicitly declared in ruby) within a block
(conditional or loop) is always out-of-scope when you leave that block.

I'm also struggling the lack of what perl calls a strict pragma.  It's
isn't has strictly typed as Java, it just prevents you from mistyping
variables.