Hacker News new | ask | show | jobs
by vorg 3901 days ago
> Existential operator accessor (?.) is a leaky abstraction for null

I found this out the hard way when using it in groovy a while back. The Options abstraction you describe is better, or the one in Java 8, which Groovy still hasn't brought into its syntax. Groovy's creator James Strachan talked a lot about how he designed Groovy to avoid the "leaky abstractions" in Java.

1 comments

There is also this gem of a quote by him[1]:

> I can honestly say if someone had shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy.

[1] http://macstrac.blogspot.com/2009/04/scala-as-long-term-repl...