Skip to content
  • Yorick Peterse's avatar
    Clean up Nil by splitting it into NilType and Nil · a97f10be
    Yorick Peterse authored
    NilType is now the base object/prototype that Nil is an instance of,
    instead of Nil being a direct instance of Object. This allows us to
    implement traits and redefine methods on the type of Nil (= NilType),
    instead of Nil itself. This in turn allows the compiler to use a more
    efficient way of representing types versus instances.
    
    In type signatures you can still use Nil (or NilType, though Nil is
    preferred), as this signals that you expect or return something
    compatible with Nil, which is only Nil itself.
    a97f10be