5 ms·
Hope ruby 4 had static type system like typescript.
by revskill 2y ago
Hope ruby 4 had static type system like typescript.
- matthuggins 2y agoI would love that!
- revskill 2y agoDHH is the issue, he means Rails is for one-person framework while he think static typing is only for enterprisey software.
- dismalaf 2y agoDHH 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.
- nona 2y agohttps://github.com/soutaro/rbs-inline 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/ https://literal.fun/
- dismalaf 2y agoI 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).
- Maledictus 2y agoI hope not, that would turn Ruby into just another of the myriad of statically typed languages. Try Crystal if you want less dynamic typing.
- nonconstant 2y agoYou can also check out the type checker by Ruby built by Stripe https://sorbet.org/ https://sorbet.org/