Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby
by GordonS on Friday June 21, 2019 @03:53AM
(#20240724)
> Why do you want explicit types for local vars?
I suppose mainly because of deficits in the static analysis tooling that exists (or at least, that I used), as they usually cannot infer types correctly. Psalm looks pretty nice though, so I'll check that out next time I'm working in this PHP codebase :)
Even with exellent tooling though, there are still occasions where I like to use an explicit type.
Check out a thing I made: https://psalm.dev. It allows you to add more descriptive types in docblocks.
> no typing of local vars
Why do you want explicit types for local vars?