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

I think they are very different too... I just can't explain how or where. Some people SWEAR by one of the two, and refuse to use the other. That's pretty harsh for languages that similar. There must be a reason... (The simplicity vs elegance argument makes sense)

Edit: I think I mean the communities are far apart.

I'm a rubyist. I have nothing against python at all, but I have zero interest in learning it. Why? Simply because if I'm going to devote mental capacity to a new language I want it to be more different. Haskell is my current choice because as far as I can tell it is the opposite of Ruby in every way except the one that is my primary criteria for interest in a language: concision.

I think the true measure of a language is how little it makes you swear when trying to make changes to your own code that you wrote a year ago.

That's positively koan-like in terms of the sheer number of independent factors aside from language that could impact that metric.

The more I think about it the more I believe concision is overrated and borderline dangerous. Shaving a few keystroke today very often means great troubles later.

I used to like those hello world concision contests, but in fact who cares? Who writes a single hello world code? What we need is a language solving the real problems met in most codebase, and I'd say the biggest fish here is the dependencies mess.

If you spend your day typing the same stuff for a simple program, or you need an IDE to be happy, that is a language failing in my opinion.

The less bloated the core syntax is, the clearer your ideas are which makes your code easier to read. I'm not saying methods should be arithmetic symbols - I think short words with not much syntax around them makes for more readable code.

ruby tends to read like pseudo-code, which is a great way to express the code idea of your algorithm when you're thinking about it, and when you're reading it back later.

Fair enough, but then what we want is readability, which is related but not equivalent to conciseness.

I often have discussions with colleagues about different coding idioms in Python, and I hear often "this one is better because it is less typing". I don't think this is very valid. If everything is equal, then sure, go for less typing. But using locals() instead of explicit arguments when calling a template rendering because "it is less typing" seems not strong enough an argument to me.

I totally agree, and if people think something is better because it's shorter, they are missing the point. But if all other things are equal (and they rarely are), I think shorter is better.

I mean concise compared to Java. The reason is because I want to primarily use vim and not need an IDE.

I picked Ruby because it was sufficiently different from C and C++ to be interesting. I got to write much shorter code, for example.

I stay away from Python because it is similar enough to not give me any great benefits over Ruby, while it has some warts (to me) such as the whitespace handling, that makes it uninteresting because it is so similar that the payoff in accepting what I consider warts is too small to warrant it.

I'd have been a lot more willing to ignore the things I don't like about Python if the differences in other areas were major.

That actually might be it. Very interesting. Thank you!

(Makes me think of Scheme/Clisp too)

> Some people SWEAR by one of the two, and refuse to use the other

Meh, I use Ruby for most of my work (day and side projects) but have nothing against Python. If I was writing a script for something on the OS I'd probably use Python.

Some people just really want to feel part of a group, I guess, and publicly dissing "the other" makes them feel more included in that group, or something. As for me, I like to feel like part of a group too, but it's a more inclusive "programming" group, rather than focussing on any one particular toolchain.

If Python vanished/became closed source/stopped being used tomorrow, I'd most likely switch to Ruby as it's the closest available language. Ironically, this similarity is exactly why I am least motivated to get into it. Why invest the time and effort to learn a new language, idioms and ecosystem that have almost 1-1 equivalents in a platform I know inside out for 8+ years?

That's because the languages are so similar. There is very little reason to become expert at both.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact