Empty VS null array?
Blake Anderton
rbanderton at gmail.com
Fri Oct 18 13:39:34 PDT 2013
On Friday, 18 October 2013 at 20:32:48 UTC, ProgrammingGhost
wrote:
> Really? I NEVER write that pattern. I may check if an array is
> null or don't because the function shouldnt be receiving nulls
> (maybe its bad but idc). I just write linq and never bother to
> see if something is empty
Yeah, LINQ makes it a lot easier, but I usually take
IEnumerable<T> instead of coding directly against arrays in that
case. I find most of the time I use arrays directly is when using
"params" parameters. It's very easy to not null check that and
cause heartache down the line.
More information about the Digitalmars-d
mailing list