It means that Nil
is a specialised object
implemented as an optimisation for the specific case of an empty list. Nil
is what you get when you call a method like List.empty
.
Calling List()
is the same as a call to List.apply(Array.empty)
. You still get an empty list; a generic one that works fine but it’s not optimised specifically for being empty.