Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Rails Is Good Enough. Parent comment
sig { params(x: Integer).returns(String) }
Sorbet may have some warts, but the example you show is simple and easy to understand.
The `sig` is as Ruby as you get IMO:
class MyTest extend T::Sig end MyTest.method(:sig).source_location => ["...gem/ruby/3.3.4/gems/sorbet-runtime-0.5.11495/lib/types/sig.rb", 27]
def sig(arg0=nil, &blk) T::Private::Methods.declare_sig(self, Kernel.caller_locations(1, 1)&.first, arg0, &blk) end
There are no comments on this comment yet.
Sorbet may have some warts, but the example you show is simple and easy to understand.
The `sig` is as Ruby as you get IMO:
And when opening that file we can get something like: I do agree about RBS being separate files that is something that can stop a coding flow.