Comparison with Ruby ?
othello at javanet.com
Thu Feb 22 22:03:23 EST 2001
Alex Martelli wrote:
> "Juergen Bocklage" <juergen.bocklage at gmx.net> wrote in message
> news:3A94489D.5B65ED19 at gmx.net...
> > Aehmmm, I'm just a beginner, but some remarks on the ruby-python
> > comparision.
> > Python separates types and classes, while Ruby treats them the
> > same. Python types are more limited (no
> > inheritance/subclassing; cannot add methods to existing types).
> > JB> Don't know
> A Ruby win here.
> > Ruby does not have tuples.
> > JB> Bad for Ruby. They are fast.
> Disagree. 'Fast' should be handled by the compiler and runtime.
> Tuples should be lists with an "immutable" setting (and there
> should be similar "immutable" settings for dictionaries) but
> otherwise indistinguishable.
> > Ruby provides method combination using `super'.
> > JB> this is a good feature, in python I think you have to use the name
> > of parent class.
> Disagree -- I _like_ it that the SPECIFIC parent-class you
> mean has to be explicitly mentioned (multiple-inheritance,
> remember). I don't like the complex rules of Dylan to allow
> magick implicitness in this, nor constraining inheritance to
> single just to allow 'super' to work:-).
I would like to see a version of 'super' that searches inherited classes
in the same order that methods are searched for. Super.method, should act
like it would if the method were not found in the current class definition.
> > Python is for me the language for beginners and designers.
> Not just for them. Lots of Hackers and eXtreme Programmers
> are also pretty happy with it.
I'm not a beginner or designer and I'm happy. See my big smile:
More information about the Python-list