Hacker News new | ask | show | jobs
by rockyj 248 days ago
Ruby is still so good to read and hack things with. It is a shame that it is not so popular and you know the reasons why. I still wish with such a good DSL friendly structure, it should have become an IaC de-facto standard language or used in some niche where I could use it freely without question.
2 comments

The biggest thing holding Ruby back is lack of gradual typing imo. I honestly think javascript is a better fit for IaC. Not only is already the language of the web (everyone has to know some javsacript) but JSDOC is supported by most IDEs giving it gradual typing. Many people don't realize jsdoc is typescript and is a full replacement.

Nowadays I like to reach for Julia for quick one-off scripts and webscraping. It has a beautiful and accessible syntax with built-in gradual typing. I would love to see it more widely adopted in the IaC world

> The biggest thing holding Ruby back is lack of gradual typing imo.

There is: https://sorbet.org/

I've used Sorbet a lot but don't really count it. I understand why others would but I find the type system is extremely shallow and limited and the overhead it adds to development (and even performance) is substantial.

Also Ruby has RBS now which is not inline and... much maligned to say the least. I think the entire ecosystem is at a crossroads rn wrt typed Ruby

And also RBS-inline if you want Jsdoc style typing
Wow I hadn't seen this before. Pretty neat, thanks. Hope this project really takes off and gains more support
No worries, I also think it deserves a bit more highlight, especially to those who are against having rbs as separate file and to those who despise the Sorbet DSL in Ruby. The plan with Rbs-inline is to merge with rbs-gem so it will come included in Rbs!
It was revolutionary for readability and has influenced a lot of newer languages. That's a pretty good legacy IMO.