Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

a) he doesn't propose to deprecate the semantics of get(), just change the name.

b) get() is useful and less verbose for cases where other logic has proven that the get() will succeed.

    boolean allPresent = a.isPresent() && b.isPresent()
    if (allPresent){
        doSomething(a.get())
    }
edit: just noticed this example is the same idea merb posted earlier.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: