Java 8 optionals
Java 8 optionals
- Subject: Java 8 optionals
- From: Mark Wardle <email@hidden>
- Date: Sat, 23 May 2015 22:24:14 +0100
Dear all,
I’ve migrated to java 8 in development and deployment and am now dabbling with new “features”.
Optionals seem a potentially good way of documenting nullability although the syntax is currently rather cumbersome it seems likely that in future versions, the syntax will improve.
However, key value coding fails when an object is encapsulated by an Optional. Intuitively, these should be unwrapped during KVC so that “normal” behaviour continues - i.e. as KVC gracefully handles null pointers in arbitrary key paths it should gracefully handle optionals containing either a value or null.
How would the handling of KVC be patched for future java versions? Is this something fixable now? Does all KVC work via NSKeyValueCoding.DefaultImplementation or are there multiple implementations? I used to have a java decompiler working but haven’t set this up since upgrading eclipse so it has been difficult to fathom the internals.
Mark
-- Dr. Mark Wardle Consultant Neurologist, University Hospital Wales, Cardiff, UK Deputy Sub-Dean for Assessments and Honorary Lecturer, Cardiff University
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden