Non mi permetterei mai di discutere le parole di Anders Hejlsberg, che nella citazione della sua intervista qui riportata disserta sui Nullable Types recentemente aggiunti al Framework 2.0 (ma che noi abbiamo già ampiamente sperimentato grazie a Luca). Tuttavia vorrei dire che personalmente sto lentemente passando da un approccio nel quale mi portavo i "null" fino ai livelli applicativi più alti (UI e BL) a quello attuale nel quale tendo a sbarazzarmi dei "null" il più presto possibile, che trovo decisamente più efficace. Ritengo quindi che se i nullable types troveranno applicazione, non debba essere necessariamente quella legata ai database la più frequente.

People do a lot of database access, and yet there are some pretty notable impediments to interactions between databases and programming languages. One of these mismatches is the absence of nullable types from programming languages. SQL databases have always had nullable types, but programming languages have never had nullable types. One of the things that you are sort of seeing here is the beginning of us trying to think really deeply about this problem. Nullable types are a specific problem that we are solving as a part of .NET 2.0. In .NET 1.0, value types can't be null, but in 2.0 they can.

Vista la caratura del personaggio che quoto, qui un bel IMHO ci sta davvero bene.

Fonte: .NET Developer's Journal

powered by IMHO 1.2