4 ms·
My experience is that the languages are similar in terms of features, but the communities are very different and there isn't much overlap between them. Ruby typ
by gaius 18y ago
My experience is that the languages are similar in terms of features, but the communities are very different and there isn't much overlap between them. Ruby types tend to be younger, focussed on the web, probably employed as full-time developers. Python types tend to be older and not employed as developers, but write code as part of their main jobs. Python people often have experienced a nightmare of unmaintainable Perl, that is why there is the insistence on there being one right way to do everything (which is the exact opposite of what Perl people believe). Ruby people (being younger and hence less experienced) haven't, which is why they talk about expressiveness and do things like monkey-patching. Neither group is "smarter" and neither language is "better". The choice is a choice of what community you want to join, not a technical one.
- cstejerean 18y ago"Python types tend to be older and not employed as developers, but write code as part of their main jobs." I'm curious, how did you arrive at that conclusion?
- gaius 18y agoMainly through direct observation. Among my own circle of friends, it's surprising how neatly we (well, those of us who use either language) divide into those categories. But you can see the pattern in job ads, discussions on mailing lists and in the domain-specific libraries for each language too. As many people got into Python through NumPy as a MATLAB alternative as got into Ruby via Rails, I'll bet. Like I say, this isn't a good thing or a bad thing, it's just interesting.
- rw 18y agoYour comment made me realize that the phrase direct observation sounds so much better than anecdotal evidence.
- gaius 18y agoYou'll notice I did say my experience :-) I'm not trying to "win" an argument here, which would require "evidence", just pointing out that there are more important things in language selection than the features/characteristics/quirks of the language itself, especially given there's not much to call between Ruby and Python. But, y'know, you could try quantifying it if you like, by looking at the libraries available for each language, and looking at how many jobs are "Ruby" as their main skill and how many are "10 years of whatever + Python".
- cstejerean 18y agoCertainly not a bad or good thing, it was just interesting to me because I've never noticed the same trend from interacting with the Python community in Chicago and at PyCon.
- OneSeventeen 18y agoI agree that this is the big decision point. I'm a Ruby guy and I've looked at Python several times and it never really stuck (I could work on a project that use Python, it just wouldn't be as fun as a project using Ruby to me). I could complain about various technical details, but if I'm entirely honest it would just be minute, meaningless, bitchy detail nitpicks.
- DocSavage 18y agoFrom my observation, the ruby community is heavily skewed by the recent influx of Rails programmers, which is web dev and younger. Old-school ruby folks (the guys who were ruby gurus when Rails was still an infant) have different characteristics: older, less confrontational, veteran programmers, Matz-like. A generalization for sure but my impression. The python community has done significant development in science/math so they have stronger libraries in those fields. Python has had an influx of Railsy people due to Django and might get a shot in the arm from Google App Engine. From a language perspective, I like the wealth of libraries for python. I like that many reference/experimental applications on web stuff is in python. The whitespace issue for me has disappeared and I'm actually leaning toward liking it more than ruby's block delimiters. The template/erb issue can be diffused by looking at HAML. (That's a cool way of incorporating pythonic indentation to templates.) Unicode is solid in python. Ruby is a better choice if you like to reshape the language into something that could potentially look un-Ruby. It's possible I haven't gotten far enough into python yet, but I can see why metaprogramming and DSLs are more prevalent in ruby than python, and it's not just "one way" culture. (Ruby's optional parentheses for method calls is an example of a language feature that fosters DSL use.)
- aristus 18y agoI have to agree. Ruby has incredible flexibility, but how it's been used by "the kids" in things like Rails (and especially Rails extensions) makes my skin crawl. This also bugs me to no end: nil.to_i == 0, 0 evals true, but nil evals false. Python's lack for me is anonymous functions. It's cumbersome to set up 40 slightly different named functions and a hash table (or some "factory pattern" thing) to do the same job as 3-4 lines of Ruby. Symbols are nice too. But for my personal work I choose Python for the libraries, cleanliness, and performance.