2009/1/10 r <rt8396 / gmail.com>:
> A noob can ease into OOP.
> Don't get me wrong, i LOVE OOP, but forcing OOP on someone from the
> beginning can be quite confusing.
I came to Ruby from an OO background, and found it perfectly
comprehensible. You came to Ruby from a more procedural background.
That's fine, but don't mistake your confusion at changing paradigms
for inherent complexity. Anyone gets confused when they try to
rearrange their thoughts after having already settled into a certain
model. For instance, it took me some time to wrap my mind around
Haskell's purely functional, recursion-heavy model after doing years
of OOP.
I do think some of the hybrid procedural/OOP languages like C++, Perl,
and Python make this a little harder because OOP is introduced as "a
new, different way of doing things" after you've already gotten used
to a procedural way of doing things. For instance, in C++ classes the
OOP is often treated as a new layer of complexity to learn on top of
what you already know. Whereas in Ruby OOP is just the air you
breathe (although you can ignore it if you wish) from day one.
I don't believe, however, that there's anything inherently more
confusing or complex about sending messages to objects than there is
in passing values to procedures. It's all a matter of background and
what your learned thinking patterns happen to be.
> And besides there are many problems
> where the OOP machinery just cannot be justified, and is overkill.
That's a little vague and I'm not sure what you're talking about.
Certainly you aren't forced to use any "machinery" you don't want in
Ruby.
Good luck in your Ruby adventures!
--
Avdi
Home: http://avdi.org
Developer Blog: http://avdi.org/devblog/
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com