Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It seems like when one is implementing Null Objects and making incomplete attempts to prevent values from ever being null it is not really an argument in favor of nullable values being good and the only type of values that should be present in a language.


I'm not smart enough to parse this. Try again?


"All non-primitive values are nullable references" is a feature of the language. You posted that you are trying to avoid using that feature (instead using non-null references to a special Null value?) and trying to avoid having null references for the types you create. It seems like you do not actually think the feature is a good feature.


> Ditto @Nullable and @Nonnull.

I was referring to the annotations. My proposal moots them.

References would still be nullable.


Can you explain why it is good that null is a valid value for your types at the same time as you are trying to prevent them from ever containing that value?


You're overthinking this.

Semantics of 'null' are the same. Underlying implementation is different, better.


If the semantics were the same, you wouldn't need a replacement and all your proposed changes would have no observable effect on the behavior of any program.


Semantics != behavior.

In truth, I'm having hard time deciding if you're trolling or actually truly, sincerely not understanding this.

Read the wiki page. Implement a few Null Objects. If you still have questions, about this trivial concept, then I'll be happy to go a few more rounds.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: