Hacker News new | ask | show | jobs
by mratzloff 2619 days ago
As long as types can be required to be explicit where ambiguous (e.g., TypeScript) in the file itself (via a magic comment or similar), I'm all for it. I am happy to declare types for external calls if I need to.

I have said for awhile that "Ruby with types" would be my favorite language to work in. I recently returned to Ruby briefly and had to integrate with a poorly-documented API. I spent more time digging through third-party code trying to figure out what certain parameters were supposed to be than writing the program itself.

2 comments

i haven't used it, but have you looked at the Crystal language? i think the idea is basically "statically typed Ruby".
I've heard of it and looked at it a bit, but haven't had a chance to use it yet!
Could elixir be a good alternative? It has typespecs https://elixir-lang.org/getting-started/typespecs-and-behavi...