On Tuesday 19 July 2005 09:41, Navindra Umanee wrote:
> James Britt <james_b / neurogami.com> wrote:
> > OO is a fairly straightforward concept.  It gets messy with different
> > implementations; Ruby's is quite clean.  People are better off going
> > straight to OO than trying to creep up on it via clumsy "newbie"
> > alternatives.
>
> Java, at least old Java, or Python would probably be an easier
> introduction to OO.

No, not Java. I'm not a teacher, but i do Java/C coaching from time
to time and the hardest things to explain are static vs instance methods
and primitives vs objects in Java. There are no static methods in Ruby
(there is always a "self") and no primitives in the Java sense.
Then explain interfaces, a type system which is partially static and
partially dynamic, try to read a single line from the console(!), ...

I like Python (don't shoot me ;) until it comes to OO, which feels
a bit clumsy. Ruby's OO feels much more "natural" to me.

IMHO there a fewer Ruby concepts you need to know to write useful
software than with Java or Python.

>
> I still find Ruby's OO to be mind-boggling with its classes are
> objects and objects are classes, class variables and class instance
> variables, virtual classes, self and so forth.  Fact is, if you really
> want to understand Ruby's object model it also helps if you go down to
> the C level implementation.[1]
>
> Ruby is fascinating and satisfying, but I'm not entirely sure exposure
> to such an object model is entirely appropriate for a newbie...
> Although certainly much of it can be ignored at the beginning and
> introduced in steps, a newbie might be more satisfied with, say,
> Python since it would probably be easier to grasp in its entirety.
>
> Cheers,
> Navin.
>
> [1] http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html

-- 
Stefan