News for hackers. Stuff that matters.
Re:Kansas couple who live in a ‘digital hell’ sue mapping co... by philipov on Friday September 23, 2016 @09:02AM (#12564228)
And this is why nullable data types are important!
Re:Kansas couple who live in a ‘digital hell’ sue mapping co... by Filligree on Friday September 23, 2016 @09:06AM (#12564257)
Nullable types are fine. The key is to make them explicitly nullable, so that programmers are allowed to use non-nullable types as well.

Both need to be permitted. Ideally by way of sum types, but Kotlin's approach should be okay.

Re:Kansas couple who live in a ‘digital hell’ sue mapping co... by sanderjd on Friday September 23, 2016 @11:02AM (#12565118)
Why do you need both? Are there use cases for null that are not covered by a (non-nullable) type with present and absent variants?
Re:Kansas couple who live in a ‘digital hell’ sue mapping co... by clappski on Friday September 23, 2016 @11:49AM (#12565494)
I think the distinction between nullable types and the non-nullable types you speak of is fairly narrow, you've just made it type safe (which isn't a bad thing!).
Re:Kansas couple who live in a ‘digital hell’ sue mapping co... by sanderjd on Friday September 23, 2016 @07:42PM (#12568691)
I don't necessarily disagree, what I don't understand is the parent comment's use of the word "need" in "Both need to be permitted". It makes me think there is something nullable types can do that non-nullable types can't do, and I'm just not sure what that is. Something like "it is fine to permit both" would make sense to me.

I guess maybe it's because in a language with no value types (like anything on the jvm), using Optionals everywhere requires a lot more objects to be allocated, so in allocation-sensitive code it might make more sense to use nulls instead.