Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMO, Ruby optimizes for reading. You simply cannot write concise code in Python as in Ruby. One reason (of many) is because of all the import statements required in Python. In Ruby, there is often only a single require statement, or maybe none at all, at the top of a file.

The difference is convention over configuration. In Ruby, if you know the convention, then you know exactly where everything is defined without needing to read it. In Python, you must read all those import statements to know where something is coming from, not to mention write them in the first place.

And if you really need to know where something is defined, you simply ask it.

    puts obj.method(:foo).source_location
So IMO, Ruby optimizes for both reading and writing.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: