What's better about Ruby than Python?

Alexander Schmolck a.schmolck at gmx.net
Mon Aug 18 18:30:13 CEST 2003


Alex Martelli <aleaxit at yahoo.com> writes:

> (I do hope that Python never gets such a powerful macro system, no matter
> the allure of "letting people define their own domain-specific little
> languages embedded in the language itself" -- it would, IMHO, impair
> Python's wonderful usefulness for application programming, by presenting an
> "attractive nuisance" to the would-be tinkerer who lurks in every
> programmer's heart...).

I don't think a powerful but potentially dangerous feature poses much of a
problem as long as there is little danger of inadvertently using it and little
incentive to inappropriately use it (e.g. you could do all sorts of stupid
things in python, like redefining __builtins__.len, but generally there isn't
much of an incentive to do so, so many of the reasons why e.g. Java
programmers might think python an unsuitable language for larger projects
don't really apply in practice. My feeling is this *not* true to the same
extent for ruby, where similar things are both encouraged and, if I don't
misremember, can happen inadvertently).

Would you still have a problem with macros in python if utilizing them
required some obvious and explicit mechanism (say a 'use_custom_syntax'
statement right at the beginning of a module that wants to use macros), so
that their use could easily be controlled by e.g. project managers?

'as




More information about the Python-list mailing list