archives

Is null needed?

In the OO languages I'm most familiar with, there's always been the ability to set a variable to null or nil which of course can lead to all sorts of fun problems. What I'm wondering is if there's an actual need for null/nil or not? Anyone know any research about this? I have a sense that null is the kind of thing that'd end up being invented by programmers if it wasn't already in the language to begin with which makes me wonder if it has been shown to be essential somehow in the same way that number systems seem to need zero.

(I suspect I may be way out of my depth in even asking this question... but what the heck :))

Data Types a la Carte

Data Types a la Carte. Wouter Swierstra.

This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell’s monolithic IO monad.

This new Functional Pearl has been mentioned twice in comments (1, 2), and has now also appeared with comments on Phil Wadler's blog. Obviously it's time to put it on the front page.