What's better about Ruby than Python?

Hans Nowak hans at zephyrfalcon.org
Thu Aug 21 04:35:57 CEST 2003


Doug Tolton wrote:

> I just don't find that argument compelling.  By that logic we should
> write the most restrictive language possible on the most restrictive
> platform possible (ie VB on Windows) because allowing choice is
> clearly a bad thing.
> 
> Don't introduce a feature because it would be so cool that everyone
> would use it?  That's just plain weird.

The problem is that a macro system that is too powerful can be harmful.

Let's say you write a useful module.  Python 3.6 just added a very powerful 
macro system, and you use it to, say, write functions with lazy evaluation, 
make strings mutable, and write your own flavor of the for-loop.  Now I cannot 
read your code anymore.  A simple function call, or a loop, does not mean what 
it used to mean.

One of Python's strengths is that you can create powerful abstractions with 
functions and classes.  But no matter what you do with these, they will always 
be functions and classes that adhere to some common language rules.  There is 
no way to go "over the top" and change the language proper.  Right now I can 
read everybody's Python code (unless deliberately obfuscated); this would 
change if there were macros that were so powerful that they would change 
language constructs, or allow new ones.  Maybe they would make your problesm 
easier to solve, but Python itself would lose in the long run.

My $0.02,

-- 
Hans (hans at zephyrfalcon.org)
http://zephyrfalcon.org/







More information about the Python-list mailing list