[nem-en] Re: [svn] r6670: nemerle/trunk: lib/narray.n macros/Util.n
Michal Moskal
michal.moskal at gmail.com
Sat Sep 23 09:21:47 CEST 2006
On 9/21/06, VladD2 <svnadmin at nemerle.org> wrote:
> + | null => array (0);
...
> public Map [From, To] (this from : array [From], f : From -> To) : array [To]
> {
> + if (from == null)
> + array(0)
> + else
...
IMHO this is inconsistent with methods in the System.Array class that
throw ArgumentNullException when given null instead of an array. While
I agree this may be useful, I think the rule of least surprise should
take precedence here -- people will expect these methods to throw
NullRef at them.
--
Michał
More information about the devel-en
mailing list