News for hackers. Stuff that matters.
Re:Ruby 3.0.0 RC1 by progressbwc on Monday December 21, 2020 @09:45AM (#25495346)
It is a pity the type hinting is done in a separate file though, as it leads to a lot of duplication. In this case, I pretty much prefer Python’s approach.
Re:Ruby 3.0.0 RC1 by Lio on Monday December 21, 2020 @10:05AM (#25495531)
You can still use the inline type hinting from Sorbet. Sorbet is compatible with RBS and you'll probably want to check types via Sorbet anyway.
Re:Ruby 3.0.0 RC1 by nerdponx on Monday December 21, 2020 @05:28PM (#25500413)
FWIW Python does also support type hinting in separate files, although the use case is mostly in adding annotations to existing code bases.