logoalt Hacker News

vidarhlast Sunday at 10:26 AM1 replyview on HN

Ruby has had "officiak" type annotations since 3.0.0 via RBS.

Exactly because of the concerns you described, RBS originally used only separate files for the type annotations, so it can be selectively and gradually applied. You can add Ruby signatures inline as comments as well, but frankly both options looks ugly, and so does many of the alternatives like Sorbet signatures.


Replies

shevy-javatoday at 7:13 PM

In fairness: RBS sucks though. This one here is a bit better than RBS.