I always joke that if nuclear war ever broke out, that spot in the Atlantic is going to bear the brunt of the explosions from all of the poorly-coded computer systems firing the missiles.
Original article: https://web.archive.org/web/20160410172437/http://fusion.net...
(I see others have also linked to other related posts)
The only difference is that NaN is implemented in hardware. However, taking advantage of that requires using the hardware arithmetic that recognizes NaN, which restricts you to floating point numbers, and all the problems that introduces.
If you have good language support and can afford the overhead, you want to replicate that behavior in the type system as some sort of tagged union:
data SentinelInt32 = NAN | Int32
Or, more likely, using the equivalent of Optional<T> that is part of your languages standard library.Of course, this means boxing all of your numbers. You could also do something like:
type SentinelInt32 = Int32
Then provide alternative arithmetic implementations that check for your Sentinel value(s) and propagate the appropriately. This avoids the memory overhead, but still adds in all the conditional overhead.It's a perfectly valid location whereas 'sentinel' values are not.
Not nearly as impactful as your example, but amusing I suppose.
https://news.ycombinator.com/item?id=11466849 (39 comments)
https://news.ycombinator.com/item?id=12259518 (3 comments)
https://news.ycombinator.com/item?id=12274203 (125 comments)
It isn't an island, despite having Island in the name. But that's true of Coney Island as well, and it also exists.
https://www.kqed.org/news/11983858/alameda-the-island-that-a...
It's only barely one today.
A closer analogy might be Vancouver's False Creek, which as the name suggests is not a creek (it's a tidal inlet).
Pine Island in New York State is both not an island, nor named after one, it's just slightly elevated.
Point is there's precedent.
Chelsea Creek in Boston empties Mill Creek.