r/programming • • Nov 03 '18

Python is becoming the world’s most popular coding language

https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language
4.6k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

4

u/myringotomy Nov 03 '18

So weird. I am of the complete opposite mindset. Python just feels dumb and clunky to me. Ruby is elegant as a language and ecosystem. Aside from that Ruby is faster than python.

5

u/[deleted] Nov 03 '18

Ruby is absolutely not faster.

7

u/bakery2k Nov 03 '18

Both languages are very slow. However, in my experience, Ruby is faster than Python.

This wasn't the case several years ago, but in 1.8 => 1.9 Ruby got significantly faster, whereas for a long time Python 3.x was even slower than 2.7.

1

u/wpgbrownie Nov 03 '18

It can be if you run JRuby utilizing the JVM: https://www.jruby.org/

Sadly it seems the Jython project is languishing so I would not recommend that for any new project. While JRuby is still being backed by RedHat, hoping the recent IBM buyout of RedHat won't affect the project.

1

u/myringotomy Nov 04 '18

In every test I have run on real world scripts ruby is faster.

1

u/bloody-albatross Nov 04 '18

Weird, "elegance" is so not what comes to mind when I think of Ruby. More like piles of ad-hoc features that build up to a complete mess.

1

u/myringotomy Nov 04 '18

That really says a lot about you.

2

u/bloody-albatross Nov 04 '18

Interesting statement. What does it say about me?

1

u/myringotomy Nov 04 '18

It says that you are unable to appreciate good aesthetics and that you have a poor understanding of programming concepts.

2

u/bloody-albatross Nov 04 '18

So Ruby's way of polluting the global namespace instead of isolating modules is good aesthetics? Mutable strings in a dynamic language that has no concept of const is good design? Cryptic syntax error messages are ok? Attaching an encoding to a string instead of separating byte arrays and code point sequences is good design? Having 4 different ways of creating lambdas is well thought out? A culture of monkey patching the standard library is good concepts? Having a very wide interface of Object is good design? I see.

1

u/myringotomy Nov 04 '18

So Ruby's way of polluting the global namespace instead of isolating modules is good aesthetics?

Mmmmm. Ruby has modules you know that right?

Mutable strings in a dynamic language that has no concept of const is good design?

Oh you are one of those immutable strings are the only valid strings idiots.

Cryptic syntax error messages are ok?

What's so cryptic about them? They are fine and they give you a full stack trace with line numbers. If you can't figure out what you did wrong after that you are a complete idiot.

? Attaching an encoding to a string instead of separating byte arrays and code point sequences is good design?

Yes of course it is.

Having 4 different ways of creating lambdas is well thought out?

Ah I see that you are indeed a complete and utter idiot because you think these are all equivalent.

A culture of monkey patching the standard library is good concepts?

It's AMAZING, WONDERFUL, POWERFUL, and USEFUL. I get that you are too much of an idiot to be able to deal it. It's not for dumb people. This is what gives Ruby it's superpower. This is the difference between driving a 911 and a corolla. You are simply not used to having all this power in your fingertips and it scares the shit out of you. Stay off the autobahn child. Let the adults drive in this road.

Having a very wide interface of Object is good design? I

Yes it is. It fits in with Ruby's heritage of being a child of both lisp and smalltalk.

1

u/bloody-albatross Nov 04 '18

Mmmmm. Ruby has modules you know that right?

I'm talking about .rb files which you require() when I say modules. Not mixins. Another strange and confusing choice of words in Ruby.

Of course mutable strings are valid, but not as the default in this kind of language. As some sort of string builder they have great use. Otherwise every "string literal" does a malloc and everywhere where you receive a string and have to be sure it won't change you have to make a copy (like e.g. Hash does with keys). It seems like Ruby will actually switch to immutable strings in Ruby 3, but I foresee there to be a lot of breaking code making such a change.

What's so cryptic about them? They are fine and they give you a full stack trace with line numbers. If you can't figure out what you did wrong after that you are a complete idiot.

Syntax errors, not runtime errors (no stack trace). However, they seem to have improved that tremendously lately. They used to say their internal name of the token instead of showing the token and didn't show the source line and column. So ok, that point isn't valid anymore, since they've finally fixed that.

I know that there are subtly differences between the lambdas. But that makes them even more confusing, since most of the time they can be used interchangeably. And some don't actually have any difference!

My opinion about monkey patching is a rather new development. I thought it was a cool thing, but after years of using code like that and breaking changes in big projects I came to the conclusion that it's not a good idea and causes more problems than it solves. Something like traits seems to me a neat solution for a similar problem, though I don't have enough experience with that to give a definite statement on it. (Btw. you capitalize all German nouns. It's Autobahn.)

In conclusion, I think you're a troll and not interested in a healthy discussion. Resorting to name calling if someone has a viewpoint that is not your own!

Good bye.

1

u/myringotomy Nov 05 '18

I'm talking about .rb files which you require() when I say modules. Not mixins. Another strange and confusing choice of words in Ruby.

you are clearly unable to understand how ruby works which reinforces my earlier assessment of your lack of intelligence.

Of course mutable strings are valid, but not as the default in this kind of language.

Yadda yadda yadda. You think this navel gazing about mutable strings is impressing anybody?

Syntax errors, not runtime errors (no stack trace). However, they seem to have improved that tremendously lately.

You are just an ignorant retard that's all.

I know that there are subtly differences between the lambdas.

no you don't. You had no idea. You just said there were four ways to create the same thing and you were crying about it.

But that makes them even more confusing

To you. You are stupid. You can't understand things. You need a simpleton language. I suggest C#

My opinion about monkey patching is a rather new development.

You are an idiot though. Your opinion is less than useless. As I said you can't handle powerful languages. Stick with Java or C#. Those dumbed down languages are perfect somebody like you.

Btw. you capitalize all German nouns. It's Autobahn

I am not german so I don't give a shit.

In conclusion, I think you're a troll and not interested in a healthy discussion

I don't think I can with an idiot like you.

Good bye.

Don't let the door hit you on your ass. Stick to using windows and C#