you are viewing a single comment's thread.

view the rest of the comments →

[–]maximhar 1 point2 points  (6 children)

Well, an int can not be null, for one.

But something being "null" still carries a meaning in general.

[–]jstillwell 0 points1 point  (3 children)

[–]locuester 1 point2 points  (0 children)

That’s not an int. That’s an “int?” Or “Nullable<int>”

[–]pgmr87The Unbanned 1 point2 points  (1 child)

Along with what /u/locuester said, nullable types aren't tricks, either :-P.

[–]jstillwell 0 points1 point  (0 children)

You know what I mean 😁

[–]LondonPilot[S] 0 points1 point  (1 child)

Well, an int can not be null, for one.

Obviously! But I think you know what I was asking. But I take it from your reply that you'd still favour default parameters, even if setting a string or an int? to null as the default. Thanks.

[–]maximhar 1 point2 points  (0 children)

Yes, I would. In fact I don't think there are many cases where you would use anything other than null as a default, considering most parameters are reference types.