Here’s the elephant in the room: Sorbet’s syntax is ugly. When people start complaining about Sorbet’s syntax, I have to spend a lot of time deflecting or even defending it, which is annoying: I’m right there with you, the syntax is ugly! It’s verbose. It’s foreign. It doesn’t resemble any typed language, nor does it complement Ruby’s unique style. My counter is that when it comes to language design, semantics—what the types mean—are easily 10 times more important than syntax. This is what I was taught; it’s also what I’ve seen. Programming is an act of theory building, and when you sit down to write code, you’re trying to codify how you’re thinking about a problem as much as instructions for the machine. Types become a tool to help get the semantics from your head into the codebase. That’s a lossy process, and types fill a role kind of like “error correcting codes” for brain dumping. So I try very hard to not get sucked into debates about syntax—in no small part because from where I stand, tons of the people complaining about the syntax also don’t like the semantics, they just don’t know how to say it. And not only do they not like Sorbet’s semantics, they don’t like statically typed semantics in the first place! Even if I changed their mind on Sorbet’s syntax, there’s basically no way I’ll change their mind on the idea of static types. So why bother? They’re not prospective Sorbet users no matter what I say. But in thinking that way, I ignore the cohort of committed, enthusiastic Sorbet users who actually love the semantics but tolerate the syntax. So that’s who this talk is for: I’m not here to convince you to start liking typing or to start using Sorbet! Instead, I want to lay everything out there, so that the people who are motivated by syntax more than me have a view of problem space and can channel their complaints into action. We’re going to cover a lot of things: The historical context at Stripe that gave rise to Sorbet The goals and constraints which sprun...
First seen: 2025-05-09 16:15
Last seen: 2025-05-09 23:16