December 2, 2025
Type wars, Ruby-style
Lowtype: Elegant Types in Ruby
Ruby gets easy ‘types’—fans cheer, purists worry
TLDR: LowType adds simple, readable type checks to Ruby code using everyday syntax. The community split: some love the clever, native feel, while others worry about real-world tooling, performance, and whether this should be built into Ruby core versus relying on RBS or third‑party tools.
Ruby’s latest buzz: LowType sneaks simple “types” into plain Ruby code, letting devs write things like greeting: String and getting runtime checks if the wrong thing shows up. It even sprinkles in arrays, hashes, return types, and typed instance variables—yet keeps it feeling like normal Ruby. The crowd? Split between ecstatic and existential. Repo
Commenters drooled over the trickery. graypegg swooned over Ruby’s party trick of looking “native” while being pure runtime magic, even noting the “pipe” (|) is just a method—chef’s kiss. But ryukoposting went full conflicted: loves types in other languages, yet uses Ruby for flexibility and wondered if this would actually help day-to-day. Lio played the practical parent: cool idea, but what about tooling, editor support, and “how do I eject without pain” if the dependency gets abandoned? Cue jokes about defaulting to 'Cher' and an “omakase” sushi meme train for Ruby’s pick-the-chef style.
Then the spice hit. thiago_fm called for ruby-core integration and speed, declared “RBS and Sorbet suck” (RBS = Ruby’s official type signatures; Sorbet = a third‑party static type checker), and doubted the core team would listen. theoldgreybeard asked the sober question: why use this over RBS? The thread turned into a mini type war—runtime vibes versus static safety—seasoned with memes, hot takes, and the eternal Ruby mood: delightful, dramatic, and just a bit chaotic.
Key Points
- •LowType treats certain default argument values as type expressions and performs runtime type checks on method parameters.
- •Defaults can be provided with the | operator to supply a value when an argument is nil, for both positional and keyword arguments.
- •Typed enumerables are supported with Array[T] and Hash[key => value] within parameter type expressions.
- •Method return types can be declared via -> { T }, including unions and multi-line type blocks, with runtime checks on returned values.
- •Typed instance variables (type_reader/type_writer/type_accessor) and local variables (type/low_type) are supported; Array[]/Hash[] syntax for type() requires including LowType::Syntax.