Chad Perrin wrote in post #1064088:
4. The books on the market for Ruby are, in my opinion, generally more
enjoyable and useful for advancing my skills as a Rubyist.
Although on the flip side, Python's official web documentation is 100
times better than Ruby's. All the semantics are documented, every single
change to the language is documented.
My other pet peeve with ruby is the ludicrous way that Strings are
handled in 1.9. Python 3's approach is clear, precisely defined, and
symmetrical.
5. Python's syntax kinda annoys the crap out of me, but maybe that's
just
me. One case in particular is the way Python defaults to a style that
leaves blocks of code looking unfinished to me, in large part because
multi-expression or multi-statement blocks have no ending delimiter.
I can live with that, especially after having used HAML.
What I find annoying about Python is that methods are function values,
and you have to remember to use () to call them. But this means you have
to know whether an attribute is a direct value, or is an accessor method
which returns the value you want.
e.g. is it str.len or str.len() ?
Answer: neither, it's len(str). But that's actually a shortcut for
str.__len__()
That would be simple enough, except that some objects can have
'properties' which you access as if they were values, but are actually
calling methods under the surface:
import random
class Foo(object):
def __random(self):
return random.random()
x = property(__random)
a = Foo()
print a.x
print a.x
So there's no consistency. With Ruby everything on an object is a
method, and it's called automatically whether you use () or not.
Instance variables are hidden.
ยทยทยท
--
Posted via http://www.ruby-forum.com/\.