News for hackers. Stuff that matters.
Re:Deprecating: java.util.Optional.get()? by pcwalton on Thursday April 28, 2016 @01:12PM (#11590387)
What if we decide that adding IP literals to the language isn't worth the complexity?

In practice, "add a new language feature" isn't a real solution for programmers who need to get the job done. Static type systems always have limitations. You need to be able to circumvent the type system if it isn't expressive enough for your use case.

Re:Deprecating: java.util.Optional.get()? by lmm on Thursday April 28, 2016 @01:33PM (#11590540)
Sure - you need casts or a similar feature. You don't need standard library methods that do casts, though, and having them invites trouble IMO.
Re:Deprecating: java.util.Optional.get()? by pcwalton on Thursday April 28, 2016 @02:00PM (#11590721)
Library methods are preferable to added language complexity.
Re:Deprecating: java.util.Optional.get()? by lmm on Thursday April 28, 2016 @02:19PM (#11590873)
You need the language functionality of casting anyway, no? Best that there's one and only one way to step around the type system.
Re:Deprecating: java.util.Optional.get()? by pcwalton on Thursday April 28, 2016 @03:12PM (#11591229)
No, you need pattern matching, which does not offer a convenient way to write Option.get().