re: Is there such thing as a bad programming language? VIEW POST

re: There's definitely a lot more than syntax - allowing objects to be null is a great example of a language design decision that has implications both...

This is why Java 8 introduced Optionals. It's not syntactic sugar so it's more verbose than the Kotlin example, but it does the same thing:

String manager = Optional.ofNullable(employee)

Oh nice! I clearly haven't used Java in a while; I do still think the elvis operator looks a bit cleaner though.

Oh man... now I cannot unsee Elvis in the "Elvis operator" :-D

code of conduct - report abuse