3 ms·
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
by anonymoushn 3y ago
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.
- specialist 3y agoI'm not smart enough to parse this. Try again?
- anonymoushn 3y ago"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.
- specialist 3y ago> Ditto @Nullable and @Nonnull. I was referring to the annotations. My proposal moots them. References would still be nullable.
- anonymoushn 3y agoCan 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?
- specialist 3y agoYou're overthinking this. Semantics of 'null' are the same. Underlying implementation is different, better.
- anonymoushn 3y agoIf 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.
- specialist 3y agoSemantics != 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.