@EvanHahn was porting some Ruby code to Crystal and found that due to static typing, the Crystal code cam out 15% shorter.
My main takeaway was this: static typing gets a bad reputation for being verbose. That’s sometimes true! But sometimes, a static type system wins because it can prevent a hydra of impossible states.
There is quite an active comment thread on lobste.rs:
Ruby intentionally tries to avoid putting types in its code. The ruby core team’s answer is rbs and typeprof. The basic idea is to separate the type definition from the code, leaving the option of not writing types. Although rbs is not widely used, it is used by some companies. (Larger companies tend to prefer sorbet.) I mention these tools because some of you may not be aware of recent attempts in Ruby.