What's better about Ruby than Python?

Jacek Generowicz jacek.generowicz at cern.ch
Fri Aug 22 05:21:54 EDT 2003


Hans Nowak <hans at zephyrfalcon.org> writes:

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

The problem is that a permissive language 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.

Let's say you rebind all the attributes of __bulitins__. Now I cannot
read your code anymore (well, I can, but it doent'h do what it looks
like it will do).

If you deliberately want to break things, you don't need macros.

os.system("rm -rf *")

Just because a stupid or malicious programmer could do "bad things" is
not a reason to reduce a language's power. (You end up with Java.)




More information about the Python-list mailing list