But collections aren't just objects. They serve a different purpose.
I'm familiar with the builder pattern and I see no need to use nullable lists with it:
Hmmm, no I get the point just fine you're just wrong and too obnoxious to admit it.
You're quoting the builder pattern like it somehow proves your point when it doesn't, nor have you provided anything to support your criticism of the article above. I don't like the extension method personally but your comment promotes bad practice so I thought it would be a good idea to comment.
I can find more articles than can be counted showing why you should initialize arrays in any language.
Builder ex. note how and why the dictionary is initialized
I agree with what you're saying for objects but not for collections. I see no value in having null collections.
But collections aren't just objects. They serve a different purpose.
I'm familiar with the builder pattern and I see no need to use nullable lists with it:
gist.github.com/GFoley83/878c2ac59...
Note the parts dictionary and why initializing it saves having to null check everywhere in derived classes.
Best practice with arrays has always been to initialize arrays in any language I've used.
Hmmm, no I get the point just fine you're just wrong and too obnoxious to admit it.
You're quoting the builder pattern like it somehow proves your point when it doesn't, nor have you provided anything to support your criticism of the article above. I don't like the extension method personally but your comment promotes bad practice so I thought it would be a good idea to comment.
I can find more articles than can be counted showing why you should initialize arrays in any language.
Builder ex. note how and why the dictionary is initialized
gist.github.com/GFoley83/878c2ac59...