Sat, 06 Nov 2010 10:20:24 +0100, Simen kjaeraas wrote: > Walter Bright <[email protected]> wrote: > >> Consider non-nullable type T: >> >> T[] a = new T[4]; > > As others have pointed out, this would be impossible for a proper > non-nullable type. The only ways to create an array of non-nullable > elements would be a literal, concatenation with non-nullable elements, > or casting an existing array of nullable elements.
That's bs.. the functional way to doing this is to wrap all elements in a Maybe monad. It makes the "null check" explicit.
