PYTHON vs RUBY

Let's get down to business Sup Forums , to the real important questions.


zach on July 1, 2009 | parent | favorite | on: Ask HN: Why Python over Ruby?

Ruby has clever syntax. Python has pure syntax.
Ruby has method aliases. Python does not allow a string to capitalize itself.

Ruby uses Ruby methods within Ruby classes to extend Ruby. Python has decorators so you can write functions that return functions that return functions to create a new function.

Ruby has strict object-oriented encapsulation. Python is laid-back about objects, because you probably know what's going on inside them anyway.

Ruby lets you leave off parentheses so you don't miss objects having attributes too much. Python will let you mix tabs and spaces for indentation, but passive-aggressively mess up your scoping as punishment.

Ruby has seven kinds of closures. Python has one, in the unlikely case a list comprehension won't do.

Ruby's C implementation is a mess of support for language-level flexibility. Python's C implementation is so clean you get the unsettling thought that you could probably write Python using C macros.

Ruby supports metaprogramming for cases when programmers find it more descriptive. Python supports metaprogramming for cases when programmers find it necessary.

Ruby is expressive. Python is direct.

Ruby is English. Python is Esperanto.

Ruby is verse. Python is prose.

Ruby is beautiful. Python is useful.

I like Python, but coming to it after using Ruby for seven years, well, I think it's like dog people and cat people. You can like having one species around, but you're always thinking -- why they can't be more like the other?

Attached: pyvsrb.png (495x204, 43K)

Are you a cat person (ruby) or a dog person (python)?

are you a fruit icecream person (ruby) or a vanilla/chocolate icecream person (python)?

A challenger appears! The cute gopher :)

Attached: A-Battle-of-Trios-Python-Ruby-Golang-1.jpg (962x520, 54K)

Attached: 1521817886277.jpg (962x520, 41K)

both are shit.

I like Ruby because it's consistent in its object-oriented approach, and it has more functional features that are integral to the language.

Ruby is no longer relevant.

This

Ruby is objectively a better language, cleaner, more fun to use. But sadly python is shilled at levels we never thought possible seems to be phasing out in favor of python and other hipster languages.

sad but true. the worse language won. well, at least there are less SJWs

I actually like it that way. Since all the trendy hipsters are flooding to Python even though there's still fairly high demand for Ruby developers, it means I have less competition.

Even though Ruby is a gorgeous language, everything about it down to how built-methods are names are just beautiful. Modules are parent class to classes so modules fit in seemlessly. But the only thing I hate about Ruby are blocks, when you compare it to how easy it is pass around high order functions in Javascript you have to wonder why blocks are so gimped in Ruby.

So the language that takes all the best attributes of Ruby, Python and Javascript is Coffeescript. I really wish Coffeescript would be implemented as its own language instead of just another Javascript transpiler.

Attached: Coffee-Script.jpg (528x528, 45K)

Ruby all the way
python is memelang

Attached: 1519319345916.jpg (670x447, 84K)

>Ruby has clever syntax
f()() doesn't parse

does anyone else find Go syntax annoying? I'm trying to like it but I'm unsure if Im going to stay

no, no one finds Go syntax annoying except the guy who starts a Go hate thread every day and samefags in it

Python is an excellent language for short quick programs. I don't know what this autism against python. Probably people that have never worked.

ehh breddy good

This. I really enjoyed playing around with ruby, but there is literally no point to it when all scientific libraries I use are only available in python.

Perl, you motherfucker.

I feel the same way, just in reverse. Ruby became popular because of rails, then Django happened, then every flavor of js framework you can think of.

Ruby is cool and awkward at the same time but the allure is gone for me. 0.02

I hate using python because most of my scripting activities involved reading non-utf8 text files.

Why and how

Bepis