Re:Go vs. Swift [pdf]
by lern_too_spel on Thursday January 19, 2017 @12:41AM
(#13433335)
Use JSR305 with Findbugs or SpotBugs to solve the problem at compile time. Using Optional in Java does have a problem with extra object overhead, so if you want to avoid that, you should use another language like Kotlin or Scala.
[ Parent
| on HN ]
Re:Go vs. Swift [pdf]
by Nullabillity on Thursday January 19, 2017 @02:33AM
(#13433846)
Scala's Somes cost an object as well, though (I believe) None is free in both Java and Scala.
Re:Go vs. Swift [pdf]
by lern_too_spel on Thursday January 19, 2017 @11:13AM
(#13436869)
You're right. Some is not an AnyVal.