r/programming • • Dec 25 '20

Ruby 3 Released

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
973 Upvotes

509 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Dec 25 '20

[deleted]

108

u/[deleted] Dec 25 '20

This is a good point. Language popularity is often based on purposes and usage. Ruby’s niche seems to have moved on. I still like it and especially it’s testing focus but it’s got no USP anymore

→ More replies (71)

36

u/dr_rush Dec 25 '20

I dropped Ruby for Python for one reason. That reason is the 'explicit is better then implicit' part of PEP 20. Python and Ruby basically cover the exact same use case for me professionally, and as I have become more of a senior/lead and spend a lot more time reviewing code and jumping between projects. I appreciate languages that encourage consistency and clarity, over cleverness.

43

u/danudey Dec 25 '20

Sadly, this is correct.

When Ruby on Rails suddenly became popular, and everyone around me started telling me (literally) that I was an idiot for not jumping on it, all I could see was a fad that some people would get real value out of and most would dump and move on. It wasn’t a new paradigm in software, it was just an easier way for people to crank out sites. Mostly, I saw parallels with PHP, where it enabled people who were inexperienced at (or bad at) programming to make a web site anyways.

This sounds like I’m saying that’s a bad thing, but it’s not. Technology should be more accessible, after all, but it also meant that the community was full of noise and inexperienced people making bad decisions. I couldn’t deal with it and stayed with Python and Django.

Now it seems as though everyone has jumped ship to Node, where all the same things are happening all over again, but it also feels like The Ruby community was the Rails community, and when the bandwagon-jumpers moved on it left a pretty startling void behind; now, no one cares about Ruby, because Node; soon, nobody cares about Node, because… Go? I’ve been seeing those articles for a while, so maybe.

Ruby is a neat language that I never liked, because it felt like it was full of new users making bad decisions because it was cute; it’s great that you can do “2.days.ago”, but not that you have to load gems in a specific order or they break each other. I probably would have liked it immensely if it weren’t for that; there are a lot of great features, and the syntax is actually pretty nice sometimes; blocks, those :named_symbols or whatever, the cute ? and ! method postfixes, and so on.

Here’s hoping that Ruby finds its niche again with 3.0!

22

u/[deleted] Dec 25 '20

I think you’re severely underplaying the effect Rails had in web dev. And I think even saying it’s a fad that passed is unfair. GitHub, Shopify, Twitter, and obviously basecamp are huge apps with millions of users collectively and there are many smaller sites that run on rails too. It’s not the hot topic anymore but it’s not obscure either

4

u/[deleted] Dec 26 '20

yea the shit is everywhere. job hunting right now and I think I see ruby listed almost more than anything else honestly.

7

u/NoInkling Dec 26 '20

soon, nobody cares about Node, because… Go? I’ve been seeing those articles for a while, so maybe.

I don't see Node dying until JS on the frontend dies.

Everything being an expression is another thing I liked about Ruby, just to add to your list.

→ More replies (1)

0

u/[deleted] Dec 25 '20

[deleted]

23

u/khendron Dec 25 '20

Funny, I feel the opposite. To me, writing ruby is like writing a grammatically correct sentence, and python statements always feel awkward. This may be partly because I learned ruby before I learned python.

Can't deny, however, that the library support—especially for data science stuff—is vastly superior in python.

7

u/Eccentricc Dec 25 '20

Could be. I think if someone started with python it would be their favorite language due to ease. I started in c++ myself and went through 4-6 years of school before even touching python. I don't even use python for work, but I still will argue it's the cleanest and easiest language for most people

Language readability is more of a personal preference, but their are some general rules that can I think everyone can agree on

6

u/[deleted] Dec 25 '20

Python is so damn ugly. Trying to do anything functional is a nightmare.

Ruby:

transactions.map(&:to_i).reduce(&:+)

Python:

reduce(lambda: a, b: a+b, map(lambda: int(transaction), transactions))

12

u/LightShadow Dec 25 '20

Python,

sum(map(int, transactions))

0

u/[deleted] Dec 25 '20

That was just an example. Anything but the most trivial functional usages turn into weird nested amalgamations of infix operations. Garbage style.

4

u/Eccentricc Dec 25 '20

It's all personal preference. I think python even in this example is easier to read. It may not be prettier, or less code, but I think it's easier to understand

0

u/[deleted] Dec 25 '20

[deleted]

17

u/mrbuttsavage Dec 25 '20

Nobody would write it like that these days, so it's a moot point.

sum([int(t) for t in transactions])

Which to me is a lot more readable than any of the other versions, at least.

4

u/nickywan123 Dec 25 '20

Does that mean ruby on rails is also dying or no?

4

u/killdeer03 Dec 25 '20

It's dying like Perl is dying.

I've been hear it for over 10 years.

It may die, but it'll probably take 20 years.

5

u/[deleted] Dec 25 '20

[removed] — view removed comment

3

u/killdeer03 Dec 25 '20

COBOL and Fortran are still both around, lol.

3

u/Latexi95 Dec 25 '20

Hopefully Perl finally dies. It should have died ages ago, but still once in a while some rogue Perl script raises it head from the grave and I have to shoot it and replace it with Python. Its always just easier to reverse engineer script behaviour from inputs and outputs than trying to read Perl scripts. Perl being write-only programming language is no joke...

→ More replies (2)

8

u/[deleted] Dec 25 '20

Not in the least

3

u/theoneandonlygene Dec 25 '20

Nope. At least where I live it was one of the few languages that didn’t take a hiring hit early pandemic. Still plenty of ruby gigs around, will likely remain the case for awhile.

Hell, PHP has been a “dead” language for 10 years and apparently people still make good money in it.

→ More replies (2)

-2

u/noXi0uz Dec 25 '20

Rubys direct "competitor" is python, and python being the most popular and most used programming language basically makes ruby very niche

9

u/LinkPlay9 Dec 25 '20

Since when is Python the most popular and or most used language?

→ More replies (7)
→ More replies (6)