2 ms·
Type system hack, not code hack. Certainly the implementation is trivial, yes. Even under the weaker type systems of C++ or Java, having this magical, undeclare
by jerf 17y ago
Type system hack, not code hack. Certainly the implementation is trivial, yes. Even under the weaker type systems of C++ or Java, having this magical, undeclared value that is also a Circle and a Car and an Account and so on is pretty dirty from the type point of view.
Haskell of course has its own troubles with bottom, and I note some people think we should be doing away with that, too.
- masklinn 17y ago> Type system hack, not code hack. It's not either. Types are simply implicitly defined as nullable, as they are in SQL.
- jerf 17y agoAnd I call that a hack, especially when I don't think it was done on purpose or with thought, but simply because "that's how it needs to work". The fact that it wasn't intended as a hack doesn't make it not a hack; I'm sure that by 2050 we'll be looking back on types that could be magically NULL in much the same way I currently curse at SQL every time something generates "SELECT * FROM blah WHERE value IN ()". ("Damn it, SQL, it's just an empty list and always false, what's the damn big deal?! So very 70s...") There's a whole slew of things like that from older technologies; someday I really ought to make a list.