What's better about Ruby than Python?

Hans Nowak hans at zephyrfalcon.org
Fri Aug 22 15:51:20 CEST 2003


Jacek Generowicz wrote:

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

I see your point.  The obvious answer would be "so don't do that, then".  Of 
course, the same answer would apply to writing abusive macros.

Python usually strikes a good balance between being permissive and restrictive. 
  The ability to rebind builtins is unfortunate, but I suppose it can 
occasionally be useful.  Fortunately not many people (have to) resort to this. 
  On the other hand, having a complete and very powerful macro system at your 
disposal, would be much more attractive.  I suspect that people would start 
abusing it from day one.  Look at metaclasses.

> 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.)

You are right, but one could wonder if the drawbacks don't outweight the 
benefits.  Python is already powerful as it is (compared to languages other 
than Lisp ;-).  I'm not sure if powerful macros would do much good.  Of course, 
that's just my opinion.

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







More information about the Python-list mailing list