S
Stefan Lang
2008/11/1 Yuh-Ruey Chen said:Replying to multiple posts:
I recognize that access to nonlocal vars can be simulated with
instance variables.
Instance variables don't simulate anything.
It does seem weird to allow two different
paradigms that interact with each other in a confusing - or at the
least non-trivial - matter (just look at my confusion).
It seems to me you are confused because you are learning by
posting questions on mailing lists instead of following
some coherent book or introduction material.
I guess my big beef with Ruby is that it is too complex and bloated
with features that often are inconsistent or lack symmetry with each
other. It's too "magical", making it hard to learn exactly how the
language works. From a language design perspective, Ruby really seems
like a mess to me, although with moments of brilliance. Most of the
time, when I'm metaprogramming, I'm guessing and looking at the
output, hoping I got so-and-so quirk correct.
Then stop guessing and learn first. Start with Programming Ruby,
here's an older version online:
http://ruby-doc.org/docs/ProgrammingRuby/
And search ruby-doc.org for more material. Seriously, you sound
like you're parroting some preconceived views about Ruby I've
seen before from other Python programmers, without even trying
to learn.
Stefan