Crystal's Compile-Time Nilable Types: Catching Null Errors Before They Ship
Crystal's ? suffix makes nilability part of the type system, turning null-reference crashes into compile-time errors. Control-flow refinement narrows types after nil checks, and &. handles optional values inline. Trade-off: nilables spread through generics, increasing verbosity.