Hacker News new | past | comments | ask | show | jobs | submit login

To me Ruby syntax looks too magic. Python is much more simple to understand, a person that doens't know python but another language such as C or Java can write programs in like 10 minutes. The only "strange" thing is the use of indentation for dividing blocks, but it's something you easily learn in 2 minutes.

Another thing that helped python is the fact that you can do fairly low-level operations in a very high level language. Python gives you os-level API/system calls that otherwise you would need to use a language like C to have access to. This makes python great to do system programming: indeed a lot of system tools in Linux where performance is not critical are written in python. For this reason you can assume any Linux/UNIX system has a python interpreter, and thus a lot of scripts and tools started to be written in python.

It's also quite easy to call C code from python code, and vice versa (for this reason python is used as a scripts/plugin engine in programs written in other languages). This is the reason a lot of scientific calculation tools are written in python, since they have the algorithms implemented in C for maximum performance with a python API to be able to be used easily.




I always used the word "magic" to describe Ruby syntax. It was my biggest complaint with it too. RoR took that even further by adding even more magic through a framework, where simple functions did HUGE amounts of hidden work.

I will say, my favorite feature of Ruby was the question mark in methods convention.

For those that don't know, a common convention in Ruby was to put a question mark at the end of any method that returns a boolean.

So for example you could write:

if product.active? ... DO THIS THING

It was fun and I enjoyed it. Behind the scenes it was just a method, but the question mark at the end was always fun to me from a readability standpoint.

However, its really not all that different than the pythonic way:

if product.is_active(): ... DO THIS THING

Something about the question mark felt fun and magical.


It's the "just works" part of magic that's the gotcha. I lead a team with a multi EiB Hadoop cluster and magically list status and rename dir can only be done with more and more caveats as you scale.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: