Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
arethuza
on Jan 10, 2012
|
parent
|
context
|
favorite
| on:
Don't return null; use a tail call
Why don't you use int? rather than Nullable<int> - aren't they equivalent?
lallysingh
on Jan 10, 2012
|
next
[–]
The point is, all values of the int are available. Null is stored somewhere outside the underlying int.
arethuza
on Jan 10, 2012
|
parent
|
next
[–]
It was just a question about the syntax used - why type Nullable<int> when there is direct syntactical support in C# for nullable types - in this case you could simply type int? rather than Nullable<int>
endianswap
on Jan 10, 2012
|
root
|
parent
|
next
[–]
At the very least Nullable<T> is a lot friendlier to search than T? if you want to learn more on the subject.
bfung
on Jan 10, 2012
|
root
|
parent
|
prev
|
next
[–]
not everyone is familiar with C#, and Nullable<int> conveys better meaning in writing to that kind of audience.
troygoode
on Jan 10, 2012
|
prev
[–]
int? is syntactic sugar for Nullable<int>, which didn't seem worth getting into :-)
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: