[Kernel2.2] Remove nulls?

2004-03-31 Thread Gianugo Rabellino
I've seen in the new API that in a number of places there are contracts that return null if something isn't found: since these are all perfect candidates for nasty NPEs, how about switching to NullObject pattern or throw Exceptions instead? Just my 0.2c, but since we're talking foundations I

Re: [Kernel2.2] Remove nulls?

2004-03-31 Thread Ugo Cei
Gianugo Rabellino wrote: I've seen in the new API that in a number of places there are contracts that return null if something isn't found: since these are all perfect candidates for nasty NPEs, how about switching to NullObject pattern or throw Exceptions instead? I think it all depends on

Re: [Kernel2.2] Remove nulls?

2004-03-31 Thread Pier Fumagalli
On 31 Mar 2004, at 11:52, Gianugo Rabellino wrote: I've seen in the new API that in a number of places there are contracts that return null if something isn't found: since these are all perfect candidates for nasty NPEs, how about switching to NullObject pattern or throw Exceptions instead? As

Re: [Kernel2.2] Remove nulls?

2004-03-31 Thread Pier Fumagalli
On 31 Mar 2004, at 13:34, Gianugo Rabellino wrote: Pier Fumagalli wrote: On 31 Mar 2004, at 11:52, Gianugo Rabellino wrote: I've seen in the new API that in a number of places there are contracts that return null if something isn't found: since these are all perfect candidates for nasty NPEs,