Past, Present, and Future of Sorbet Type Syntax

26 points by briankung


e12e

This is probably the best article I’ve read on ruby types so far. I still think typing for ruby is an ugly, useless mess - but this gives me some hope that things are finally improving to a point where all rubists might enjoy using types.

I’m still a bit envious of how python managed to solve this rather elegantly - especially merging typing and introspection as demonstrated by fastapi for example.

The verbosity and redundancy required to expose a typed rest or graphql api in ruby is just ridiculous.

schneems

A passing thought I had about Ruby types: I care much less about the data and more about the behavior of an object. What I really want is a rust trait style “trait only” type system. Rust traits are amazing and feel like strict duck typing, which is Ruby’s whole thing.