News for hackers. Stuff that matters.
Re:Option and null in dynamic languages by Dewie on Tuesday December 09, 2014 @12:50PM (#8724297)
That doesn't seem nice if the map wasn't supposed to be nil (if you assume that failing fast on buggy behaviour is good). But I guess you might want to, on purpose, instantiate and use a map which is nil?
Re:Option and null in dynamic languages by NateDad on Tuesday December 09, 2014 @01:49PM (#8724765)
What's the difference between a nil map and a non-nil but empty map? You asked if the map had a value for your key, and it said no.
Re:Option and null in dynamic languages by Dewie on Tuesday December 09, 2014 @04:35PM (#8725941)
> What's the difference between a nil map and a non-nil but empty map?

A nil map is the absence of a map. An empty map is an empty map. The distinction is clear.