News for hackers. Stuff that matters.
Re:Java 8’s new Optional type doesn't solve anything by bkv on Monday October 26, 2015 @11:29AM (#10452060)
>Actually, (much to my disappointment as I'm just learning rust) you can just take an Option or Result and .unwrap() and the compiler won't complain at you

unwrap() is a convenience method that still uses exhaustive pattern matching and will panic if no value is present. The developer is making a conscious decision to panic in a not-present scenario, and on a case-by-case basis. The compiler is still doing it's job. This is different than java, where a get() on a non-present value is a runtime violation.

Re:Java 8’s new Optional type doesn't solve anything by oldmanjay on Monday October 26, 2015 @11:55AM (#10452226)
The distinction is there but the runtime behavior is not remarkably different. This feels more like a philosophical argument with no real purpose, to be honest.
Re:Java 8’s new Optional type doesn't solve anything by bkv on Monday October 26, 2015 @02:12PM (#10453212)
If you don't think it's an important distinction then your real beef is that the developer can choose to panic in certain scenarios, which of course is silly when put in context.