Live data from Hacker News

Do I not like Ruby anymore? (2024)

sgt.hootr.club

81–90 of 184 posts

Re: Do I not like Ruby anymore? (2024)

#81
This reads like a love letter to programming languages. You can never truly talk about the quirks of a language without dabbling in it. And without experience with other languages - I doubt some of these quirks might even be seen as such.

Error handling for instance has always been my pet peeve. With dynamic languages like python, errors were all "exceptions". But then golang came along and decided they'd be values and that only the truly exceptional errors should be "panicked". But the if err != nil syntax became super verbose only after I learned about the Result from Rust and the matching syntax associated with it.

A lot of people are shocked when they learn about ruby's monkey patching. I for one never truly groked the packaging of python applications until uv came along to deliver an experience similar to npm.

And I agree, Typescript is the state of the art as far as static typing on top of a dynamic language is concerned. But I never considered it a programming language. More like a tool to assist developers write/manage large javascript code.

In the end, I think the true reason for returning to pythong probably had more to do with getting a python gig. I live in the part of the world where my tech stack ended up being influenced early on by the places I worked. I didn't mind learning Typescript for my first gig or improving my skills with nodejs.

In the end, every language can really get things done. And Typescript helps me pay my bills and I couldn't be more grateful. Learn to love the quirks of your language and stop comparing it unfavorably with others. To date, I've never seen a language as elegant as ruby. Nor do I find an ecosystem better than python's at data science.

Re: Do I not like Ruby anymore? (2024)

#82
post #74
post #11

Back when autocompletion and stuff were only available in Visual Studio/Xcode/Other bug IDEs, I was forced to use Ruby and fell in love with it. It didn't matter what I used as my editor was Sublime. But when VSCode came and language features became democratized, I never touched a type-less language again. Why should someone opt for a language with absolutely no features where one can have autocompletion, typecheckin…

As someone coming from Ruby to TypeScript, I find types cumbersome, verbose, complex, and not of much use. I have been writing and reading TS for the past six months. What am I missing?

If your only exposure to static typing is six months of TS, what you are missing is experience. You're still on the learning curve and thus the cognitive load of explicit types is high, but with time the opposite becomes true.

Re: Do I not like Ruby anymore? (2024)

#83
post #74
post #11

Back when autocompletion and stuff were only available in Visual Studio/Xcode/Other bug IDEs, I was forced to use Ruby and fell in love with it. It didn't matter what I used as my editor was Sublime. But when VSCode came and language features became democratized, I never touched a type-less language again. Why should someone opt for a language with absolutely no features where one can have autocompletion, typecheckin…

As someone coming from Ruby to TypeScript, I find types cumbersome, verbose, complex, and not of much use. I have been writing and reading TS for the past six months. What am I missing?

Typescript is not suitable for all applications. I also transitioned to Typescript from python some years ago and the extra information about "intent" provided by types made a world of difference to me when reading code written by other people. Type information is so valuable in a team of 3+ developers and when a rest api has at least 5+ resources. If your application or team size are any less, the benefits of typescript might not be obvious. I think that could be what you're experiencing.

In a team, it is just so much easier to come across a "typed" function as opposed to an untyped one. You need to read the entire function to know what it is about.

Re: Do I not like Ruby anymore? (2024)

#84
post #11

Back when autocompletion and stuff were only available in Visual Studio/Xcode/Other bug IDEs, I was forced to use Ruby and fell in love with it. It didn't matter what I used as my editor was Sublime. But when VSCode came and language features became democratized, I never touched a type-less language again. Why should someone opt for a language with absolutely no features where one can have autocompletion, typecheckin…

> it’s a shame no language is as beautiful as Ruby [...] I really think it's a bad choice of Ruby not to care for types

Do you think Ruby could change something so fundamental as dynamic => static typing and still retain its beauty?

The only static typing solution I've seen for Ruby is Sorbet, and it's... not beautiful.

Re: Do I not like Ruby anymore? (2024)

#85
I'm going through the same processes as the author, after about a decade of Ruby I'm writing Typescript, Go and type-hinted Python, and I don't think I want to go back to the lack of namespaces/packages and the lack of typing.

And I've actually used Sorbet with Ruby for 2 years, but that seems like a really bad solution to this problem.

Re: Do I not like Ruby anymore? (2024)

#86
post #85

I'm going through the same processes as the author, after about a decade of Ruby I'm writing Typescript, Go and type-hinted Python, and I don't think I want to go back to the lack of namespaces/packages and the lack of typing. And I've actually used Sorbet with Ruby for 2 years, but that seems like a really bad solution to this problem.

What do you think of rbs-inline?

Re: Do I not like Ruby anymore? (2024)

#87
post #50

> Python is not my favorite programming language. In fact, allow me to drop the euphemism and express my pure, unadulterated thoughts about it: I never liked Python, I see it as a huge red flag and I think the world would be a better place if we all decided to finally move on from it. Why do people make hating a tool their entire personality? I have noticed this same thing with languages like Go ("oh no Go still bad"…

> Why do people make hating a tool their entire personality? I have noticed this same thing with languages like Go

It runs very deep for some people. "That's not Pythonic!" or "That's all unreadable line-noise!"

It becomes a kind of language bigotry similar to English-speakers hating a foreign language. And yet, as you rightly say, these are just programming tools.

I suppose that when humans invest in any type of language, they form and protect the orthodoxy.

Re: Do I not like Ruby anymore? (2024)

#88

I'm a python developer, and a big fan of the features with gradual typing etc. This article really highlights for me though, how python has very much changed from the language it was even 5 years ago. Initially, the celebrated feature of python was that it allowed easy and fast development for newcomers. There was a joke a long the lines, "I learned python, it was a great weekend". As much as I like python's type sys…

> python is no longer the "learn in a weekend" language

For the last 10 years, Python's evolution has been directed by professional developers working for large software companies, and they've focused on adding features that help them work on million-line Python codebases.

Even if the language was originally intended to be easy to learn and ideal for small programs, that's clearly not a design goal any more.

Is there a language today that’s as easy to understand as the “executable pseudocode” of Python 2.x? I haven’t found one.

Re: Do I not like Ruby anymore? (2024)

#89
post #50

> Python is not my favorite programming language. In fact, allow me to drop the euphemism and express my pure, unadulterated thoughts about it: I never liked Python, I see it as a huge red flag and I think the world would be a better place if we all decided to finally move on from it. Why do people make hating a tool their entire personality? I have noticed this same thing with languages like Go ("oh no Go still bad"…

You haven't used many screwdrivers if you don't hate some of them for stripping screws, slicing your hand etc.

Likewise, other ones exist that make jobs super easy - be they having a ratchet, or quick change of bits, etc

Programming languages seem to be a pretty good parallel. Though, I don't see why Python in particular would be hated. It has its bullshit, but it's workable.

Re: Do I not like Ruby anymore? (2024)

#90
post #56

Earlier quoted context omitted.

I'd love Python if it weren't for whitespace. I wanna cut/paste code into a REPL, and Python makes that difficult.

I find that the IPython REPL has downright amazing multiline support. I've always been envious of it when using GHCI. But even the standard Python REPL supports multiline paste just fine. So what exactly are you talking about? Rolling your own?

You can't copy a method from a class and then paste it in the REPL, it will complain about indentation.

Workarounds:

1) copy whole class

2) remove indentation before copying

Post reply on HN