News for hackers. Stuff that matters.
Re:Java Without If by jankotek on Saturday January 28, 2017 @04:58PM (#13509670)
Java maps return null, sometimes I have to use those in Scala.

Most Java Collections does not allow null keys and null values.

Re:Java Without If by premium-concern on Sunday January 29, 2017 @02:25PM (#13516031)
So you blame Scala both for Java's mistakes as well as addressing them, while Kotlin, which doubles down on Java's poor decisions does everything right? This makes literally no sense at all.

Also, only a few of the newer concurrent Java collections disallow nulls. All the classes commonly used allow null, as well as the collection interfaces themself.

Java had the chance to address this with Optional, but they got the implementation of the null handling completely wrong. Now they are stuck with it, which caused an obscene amount of complexity in the new generics spec to work around it.