Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorbet[0] is probably the closest to what you're looking for. It's not something I would recommend to someone who wants to get started with Ruby, since it would be limiting to learn it as if it was a statically typed language.

[0] https://sorbet.org/



Sorbet is OK if you want to type an app, but falls apart for a lib.

RBS (descs) + Steep (type checker) is a bit younger but I found it more usable in general, especially on the corner cases.


Yeah I've tried setting it up for a library but Sorbet won't pick it up, Tapioca won't pick it up. It'll generate its own types which are exactly what I don't want.

Beyond that, it's too intrusive in the code for me. I could live with 'sig' blocks above methods, but there's an immediate readability cost when you start having to wrap stuff in T.let, T.must, T.nilable, etc.

Personally I'd rather improve my testing skills here too. Knowing how to write a good test is a valuable skill.




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

Search: