← Back to context

Comment by dymk

1 day ago

I'm a Ruby enthusiast - Sorbet is one of the best things since sliced bread to happen to the ecosystem. matz is pushing hard on static typing as part of the standard Ruby ecosystem as well.

Matz hates (inline) type annotations and said many times that they're not coming to Ruby. IIUC he only allowed RBS (type annotations in separate files) due to community pressure.

A lot of Rubyists deeply care about code aesthetics and Sorbet annotations are unfortunately quite ugly. There are also RBS comments, which look a bit better, but tooling/LSPs are not quite there yet IME.

Wow, never heard about Sorbet before, looks good! I was a Ruby developer around ten years ago, and never stopped liking the language. I have moved into functional programming since, with strong types like Haskell, and do appreciate compile time type checking nowadays. Sorbet seems like a nice compromise here though!

Really? Matt is pushing for it now? Dang. Might try Sorbet out.

What IDE/LSP do you use? I was on VSCode/ruby-lsp and disabled sorbet, but after working with Zod, I became quite intrigued with the value of letting the schema do a lot of the guarding. I was under the impression that things like Crystal (statically typed Ruby) were not in vogue, and that the reason no one was moving toward static typing was because Matz did not give his blessing.

(Just checked sorbet landing page, looks like it's mainly/only for fn signatures?)