4 ms·
Example: http://docs.python.org/reference/datamodel.html#basic-customization http://docs.python.org/reference/datamodel.html#basic-custom... vs http://www.br
by clyfe 16y ago
Example:
http://docs.python.org/reference/datamodel.html#basic-customization http://docs.python.org/reference/datamodel.html#basic-custom...
vs
http://www.brpreiss.com/books/opus8/html/page595.html http://www.brpreiss.com/books/opus8/html/page595.html
- Raphael_Amiard 16y agoI don't know if that's tongue in cheek, but as a mainly python programmer i find ruby much more clear regarding operator overloading.
- prog 16y agoI have to agree. I am also mainly a Python programmer who had dabbled a bit in Ruby, but in the above examples, Ruby is definitely nicer. I mentioned some of the reasons I stuck with Python here: http://news.ycombinator.com/item?id=1941594 http://news.ycombinator.com/item?id=1941594 Where _language_ is concerned, I think Ruby is every bit as nice as Python if not nicer.
- alextgordon 16y agoI think the point of Python's horrible syntax is to make operator overloading so painful that you're less likely to abuse it (cough C++ cough Haskell). Either that or Guido really likes underscores.
- Daishiman 16y agoIt's part of the point. The idea being that when you're doing operator overloading or metaclass hacking there's a simple, easy visual guide.