Hacker News new | past | comments | ask | show | jobs | submit login

Hope ruby 4 had static type system like typescript.



I hope not, that would turn Ruby into just another of the myriad of statically typed languages.

Try Crystal if you want less dynamic typing.


You can also check out the type checker by Ruby built by Stripe https://sorbet.org/


I would love that!


DHH is the issue, he means Rails is for one-person framework while he think static typing is only for enterprisey software.


DHH has no say in Ruby development.

That being said, Matz also isn't a fan of static typing. Static type annotations exist in the form of RBS, but no one that matters in the Ruby eco-system is pushing static type annotations in .rb files themselves.

Also, after seeing TypeScript, I'm very happy about that.


https://github.com/soutaro/rbs-inline

I myself am unsure where I stand on RBS. I wouldn't mind more use of it in my gem dependencies, but would probably not like it if it was enforced everywhere.

For now I'll stick with improving my test/spec-writing skills, and maybe some runtime type checking like https://literal.fun/


I think RBS is a decent tool, I don't mind it as long as it never becomes a requirement for anything. I hate the trend of statically typed dynamic languages because it's all of the pain without the main benefit (native speed).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: