I'm not sure I got that 100% but replicating the API only made sense when
you were not targetting the Java 8 runtime.  Now that Java 8 is the minimum
why not use the core concepts?

BTW, it'll probably make sense to have support for generic types in general.

On Fri, Sep 29, 2017 at 5:17 AM Anatole Tresch <[email protected]> wrote:

> We we should not use Optional and instead of duplicate the API in our
> framework, whereas the JDK already provides it?
>
> For me that makes no sense...
>
> Looking forward to your thoughts.
>
> J Anatole
>
>
> 2017-09-28 22:06 GMT+02:00 Oliver B. Fischer <[email protected]>:
>
> > Hi, did anyone have a look at this proposal?
> >
> >
> > Am 23.09.17 um 02:21 schrieb Oliver B. Fischer:
> >
> > Philipp and I meet today at BEDCON and discussed the pros and cons. We
> >> think we should not use Optional as a possible return type but we
> >> could/should a similar functionality.
> >>
> >> What do you think about this example code?
> >>
> >> Configuration c = ConfigurationProvider.getConfiguration();
> >>
> >> String value1 = c.key("K1").get();
> >> String value2 = c.key("K2").getOrThrow(() -> new RuntimeException());
> >> String value3 = c.key("K3").getOrElse(() -> "DEFAULT")
> >> String value4 = c.key("K4").map(v -> v).get()
> >>
> >> WDYT?
> >>
> >> Oliver
> >>
> >> Am 21.09.17 um 13:52 schrieb John D. Ament:
> >>
> >>> Hi
> >>>
> >>> I was wondering, would it make sense for Tamaya to handle within its
> core
> >>> usage of Optional?  Its required by MP, however the code looks a bit
> >>> disjointed in how it works.  The method MicroprofileConfig.getOptional
> >>> Value
> >>> looks elegant, but it seems there's no handling of the optional values
> >>> properly in the producer method.
> >>>
> >>> John
> >>>
> >>>
> >>
> > --
> > N Oliver B. Fischer
> > A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
> > P +49 30 44793251 <+49%2030%2044793251>
> > M +49 178 7903538 <+49%20178%207903538>
> > E [email protected]
> > S oliver.b.fischer
> > J [email protected]
> > X http://xing.to/obf
> >
> >
>
>
> --
> *Anatole Tresch*
> PPMC Member Apache Tamaya
> JCP Star Spec Lead
> *Switzerland, Europe Zurich, GMT+1*
> *maketechsimple.wordpress.com <http://maketechsimple.wordpress.com/> *
> *Twitter:  @atsticks, @tamayaconf*
>
> *Speaking at:*
>
>   [image: JSD_Speaker_2017][image: J-Con 2017 logo][image: JVM Con]
>

Reply via email to