"Rich Kilmer" <rich / infoether.com> writes:

> Ouch!
> 
> http://www.mindview.net/Etc/FAQ.html#Ruby
> 
> Thoughts?

what i find quite funny is:

# Perhaps the real question to ask, which is usually what I ask myself when I'm
# looking at a language, is "what does this language do/accomplish/improve that
# is better than the language it is competing with (in this case, Python)."

Well, quite easy, just have a look at what's new in python 2.x [1,2]
- "PEP 234: Iterators" with "PEP 255: Simple Generators", even using the
"yield" name
- "PEP 227: Nested Scopes", the {|i| ... } can be seen as an anonymous
function introducing nested scopes. Aka closures are already there in ruby,
whereas python 2.0 didn't have it. And Python still have no way to restrict a
variable scope from being function-wide (think "for i in ..." then using i)
- manipulating builtin objects via methods, not functions 
(eg: String methods[2])
- f(*args, **kw) to flatten args
- Augmented Assignment (+=, *= ...)
- Garbage Collection of Cycles (python is still using refcount, but at least
do not leak)
- subclassing of builtin types (i don't remember if it's available yet in 2.2
or should come soon?)

Now of course, the arguments above were in favour of Ruby vs Python, but are
no more :)  Except for saying Ruby guided Python in the right direction.


[1] http://www.amk.ca/python/2.2/
[2] http://www.amk.ca/python/2.0/

--
Pixel