You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2015/01/02 12:03:49 UTC
java 8: really?
Hi guys,
I know we said java 8 is good to start a project but this is a blocker
to make of tamaya built in config solution in project bound to java 7
like JavaEE 7 containers for instance.
Since Java 8 doesn't bring anything on implemtation point of view we
mandate/cant replace by java 7 can we rethink about it?
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
On Tuesday, 6 January 2015, 14:42, Werner Keil <we...@gmail.com> wrote:
>As Java CDI 2 and EE 8 (some or all of its components will require Java SE 8 as prerequisite) have just started, none of them even produced an EDR, I would also prefer starting with Java (EE) 7 for now.
+1
Also for CDI there are compatible CDI-1.0 and CDI-1.0 impls already which people can use if they need SE7. For javaconfig we don't have such. We could do a javaconfig-2.0 which is backward compat and supports Java8 styles.
> that's not going to be final till 2016/17.
Hah, 2018/19 might even be too early...
As an example: How many enterprise ready EE7 servers do you know?
There is only a single one: TMax JEUS (only common in some asian countries). All others (Glassfish4, Wildfly8) are *explictly* not intended for enterprise grade production scenarios still. All other vendors don't even have an EE7 impl yet.
So maybe we will see EE7 (SEVEN that is!) in big companies starting with this year. This makes it 3 years from spec ready to production ready. Now the EE8 spec is targeted for 2016 and probably might get stretched to 2017. Do the math yourself ;)
LieGrue,
strub
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
It may leave room for interpretation, but
https://jcp.org/en/jsr/detail?id=365 clearly says
>The Java(TM) SE support of the spec will be based on Java(TM) SE 8.
That sounds a bit wider than saying the RI will be based on Java(TM) SE 8
to me. I know some here are in the CDI 2 EG, so to clarify whether the API
"cdi-spec" has mandatory dependencies on Java SE 8 or just the RI (Weld) is
up to that EG;-)
We made it very clear, that JSR 363 API will support at least Java SE 6
simply because the Realtime and Embedded world has so many Long-term
requirements and I know personally (as does another fellow Spec Lead who
worked in another part of the same enterprise once) that a lot of critical
Embedded solutions are based on Java SE 6 (Embedded or not) and will remain
for many years or even decades.
Also ME 8 is only compatible with SE 7, so the question of SE 8 in the API
wasn't even valid to 363;-)
Werner
On Tue, Jan 6, 2015 at 2:46 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:
> CDI 2 will hopefully not mandates j8 from implementation point of
> view. And pretty sure spec will finally support j7 as well. It is not
> cause you support j8 features that you need it in your APIs.
>
> About tamaya I'd start as easy as possible and only ask the question
> when we'll hit java 8 need. Today all usages we have of j8 are just to
> add noise to our usages IMO
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-06 14:41 GMT+01:00 Werner Keil <we...@gmail.com>:
> > As Java CDI 2 and EE 8 (some or all of its components will require Java
> SE
> > 8 as prerequisite) have just started, none of them even produced an EDR,
> I
> > would also prefer starting with Java (EE) 7 for now.
> >
> > If there are official releases during the incubator these allow the use
> > with stable, official and (Java EE 6 or 7) certified containers rather
> than
> > just an RI or even preview and Beta containers. Let's see, how much it
> > takes to graduate, maybe if Java EE 8 or CDI 2 are also final or close to
> > final, we could always switch to Java 8 then.
> > For a pure SE 8 standalone library like JavaMoney it may be worth
> starting
> > with SE 8, but Tamaya aims at Enterprise containers "first" so we should
> > stick to the final Enterprise standards IMHO not the next version that's
> > not going to be final till 2016/17.
> >
> > Werner
> >
> >
> > On Tue, Jan 6, 2015 at 2:26 PM, Mark Struberg <st...@yahoo.de> wrote:
> >
> >> I'm also still not convinced.
> >>
> >> Let's step back a few meters and simply compare the benefits vs the
> >> downsides
> >>
> >>
> >> - PRO
> >> * more 'modern'
> >> * Optional
> >> * Functions
> >> * default methods in interfaces
> >>
> >>
> >> - CON
> >> * not backward compatible
> >> * blocks adoption in current containers
> >> * blocks adoption in many user projects
> >> * we actually don't really need any of it's features
> >>
> >>
> >> Let's face it: JDK8 is still not production ready. It is somewhat slower
> >> than Java7 still and I honestly know no single big project which runs on
> >> Java8. Not even the JavaEE7 TCK passes on Java8...
> >>
> >>
> >>
> >> Ad Optional:
> >>
> >> The discussion we had was around Optional. The only impact it has on me
> >> now is that instead of
> >>
> >>
> >> if (blabla != null) {...}
> >>
> >> I've seen
> >>
> >> if (blabla.isPresent()) {..}
> >>
> >> Most code I've seen simply don't use the ?. chain notation because it
> only
> >> works for 'navigation' use cases. Which we barely have (except for
> >> programmatic default values, but there are perfectly valid alternative
> >> solutions as well).
> >>
> >>
> >>
> >> Ad Functions:
> >> I've not yet seen a benefit in our current API. Actually the only thing
> we
> >> use it for currently is to replace 2 Comparator instances. I don't think
> >> this is something we could't do with SE7 as well ;)
> >>
> >>
> >>
> >> Ad default methods in interfaces:
> >> Actually I'm not a huge fan of all those convenience functions in our
> >> Configuration interface anyway. It just makes it harder to read.
> >>
> >>
> >>
> >> What about adding either a branch or a module for java7?
> >>
> >> That way we could continue trying implement our core functionality with
> >> both. And at the end of the day we do a resume and weight up the pros
> and
> >> cons again.
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> >>
> >>
> >> > On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com>
> >> wrote:
> >> > > Romain,
> >> >
> >> > That's a good point. I flagged this with e.g. JavaMoney. Given it aims
> >> more
> >> > at future platforms and e.g. java.util.Currency (or ICU4J) are already
> >> > available for Java 7 or even 6 and before, that seemed of less
> concern to
> >> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so
> a
> >> > theoretical ME usage of the API could work in a future version of Java
> >> > (ME), too.
> >> >
> >> > Here it's more about backward-compatibility, and looking at other
> Apache
> >> > projects like DeviceMap, etc. a majority requires at most Java 6 as
> >> minimum
> >> > version today. Some may have shifted to 7, but I couldn't think of an
> >> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so
> some
> >> > modules in DeltaSpike could eventually graduate to CDI 2 and require
> >> Java
> >> > SE 8, but a prior version of the same projects or modules will still
> work
> >> > with CDI 1.x and Java 7.
> >> >
> >> > There are a few "functional" aspects, but if you need to declare a
> >> > "Functional Interface" that works in Java 7 and 8 all you have to do
> >> > is
> >> > forget about the SE 8 annotation. It'll still work in 8 if declared
> >> right.
> >> > So we might have to declare some of the interfaces without the
> >> > @FunctionalInterface annotation (or comment it out for now) and
> refrain
> >> > from reusing those Java SE 8 provides. Stubbing them out with either
> >> config
> >> > specific or the same method names would be a solution.
> >> >
> >> > Optional was discussed in a hangout last night, and I wasn't under the
> >> > impression we would have to use it in places where a simple "null
> >> > check"
> >> > also works, so that doesn't look like a Java SE 8 feature to be seen
> as
> >> > mandadory or inevitable either.
> >> >
> >> > If the API was mostly portable, then some implementations or modules
> >> could
> >> > be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
> >> >
> >> >
> >> > Werner
> >> >
> >> >
> >> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> >> > <rm...@gmail.com>
> >> > wrote:
> >> >
> >> >> Hi guys,
> >> >>
> >> >> I know we said java 8 is good to start a project but this is a
> blocker
> >> >> to make of tamaya built in config solution in project bound to java
> 7
> >> >> like JavaEE 7 containers for instance.
> >> >>
> >> >> Since Java 8 doesn't bring anything on implemtation point of view we
> >> >> mandate/cant replace by java 7 can we rethink about it?
> >> >>
> >> >>
> >> >> Romain Manni-Bucau
> >> >> @rmannibucau
> >> >> http://www.tomitribe.com
> >> >> http://rmannibucau.wordpress.com
> >> >> https://github.com/rmannibucau
> >> >>
> >> >
> >>
>
Re: java 8: really?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
CDI 2 will hopefully not mandates j8 from implementation point of
view. And pretty sure spec will finally support j7 as well. It is not
cause you support j8 features that you need it in your APIs.
About tamaya I'd start as easy as possible and only ask the question
when we'll hit java 8 need. Today all usages we have of j8 are just to
add noise to our usages IMO
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-06 14:41 GMT+01:00 Werner Keil <we...@gmail.com>:
> As Java CDI 2 and EE 8 (some or all of its components will require Java SE
> 8 as prerequisite) have just started, none of them even produced an EDR, I
> would also prefer starting with Java (EE) 7 for now.
>
> If there are official releases during the incubator these allow the use
> with stable, official and (Java EE 6 or 7) certified containers rather than
> just an RI or even preview and Beta containers. Let's see, how much it
> takes to graduate, maybe if Java EE 8 or CDI 2 are also final or close to
> final, we could always switch to Java 8 then.
> For a pure SE 8 standalone library like JavaMoney it may be worth starting
> with SE 8, but Tamaya aims at Enterprise containers "first" so we should
> stick to the final Enterprise standards IMHO not the next version that's
> not going to be final till 2016/17.
>
> Werner
>
>
> On Tue, Jan 6, 2015 at 2:26 PM, Mark Struberg <st...@yahoo.de> wrote:
>
>> I'm also still not convinced.
>>
>> Let's step back a few meters and simply compare the benefits vs the
>> downsides
>>
>>
>> - PRO
>> * more 'modern'
>> * Optional
>> * Functions
>> * default methods in interfaces
>>
>>
>> - CON
>> * not backward compatible
>> * blocks adoption in current containers
>> * blocks adoption in many user projects
>> * we actually don't really need any of it's features
>>
>>
>> Let's face it: JDK8 is still not production ready. It is somewhat slower
>> than Java7 still and I honestly know no single big project which runs on
>> Java8. Not even the JavaEE7 TCK passes on Java8...
>>
>>
>>
>> Ad Optional:
>>
>> The discussion we had was around Optional. The only impact it has on me
>> now is that instead of
>>
>>
>> if (blabla != null) {...}
>>
>> I've seen
>>
>> if (blabla.isPresent()) {..}
>>
>> Most code I've seen simply don't use the ?. chain notation because it only
>> works for 'navigation' use cases. Which we barely have (except for
>> programmatic default values, but there are perfectly valid alternative
>> solutions as well).
>>
>>
>>
>> Ad Functions:
>> I've not yet seen a benefit in our current API. Actually the only thing we
>> use it for currently is to replace 2 Comparator instances. I don't think
>> this is something we could't do with SE7 as well ;)
>>
>>
>>
>> Ad default methods in interfaces:
>> Actually I'm not a huge fan of all those convenience functions in our
>> Configuration interface anyway. It just makes it harder to read.
>>
>>
>>
>> What about adding either a branch or a module for java7?
>>
>> That way we could continue trying implement our core functionality with
>> both. And at the end of the day we do a resume and weight up the pros and
>> cons again.
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>> > On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com>
>> wrote:
>> > > Romain,
>> >
>> > That's a good point. I flagged this with e.g. JavaMoney. Given it aims
>> more
>> > at future platforms and e.g. java.util.Currency (or ICU4J) are already
>> > available for Java 7 or even 6 and before, that seemed of less concern to
>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
>> > theoretical ME usage of the API could work in a future version of Java
>> > (ME), too.
>> >
>> > Here it's more about backward-compatibility, and looking at other Apache
>> > projects like DeviceMap, etc. a majority requires at most Java 6 as
>> minimum
>> > version today. Some may have shifted to 7, but I couldn't think of an
>> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
>> > modules in DeltaSpike could eventually graduate to CDI 2 and require
>> Java
>> > SE 8, but a prior version of the same projects or modules will still work
>> > with CDI 1.x and Java 7.
>> >
>> > There are a few "functional" aspects, but if you need to declare a
>> > "Functional Interface" that works in Java 7 and 8 all you have to do
>> > is
>> > forget about the SE 8 annotation. It'll still work in 8 if declared
>> right.
>> > So we might have to declare some of the interfaces without the
>> > @FunctionalInterface annotation (or comment it out for now) and refrain
>> > from reusing those Java SE 8 provides. Stubbing them out with either
>> config
>> > specific or the same method names would be a solution.
>> >
>> > Optional was discussed in a hangout last night, and I wasn't under the
>> > impression we would have to use it in places where a simple "null
>> > check"
>> > also works, so that doesn't look like a Java SE 8 feature to be seen as
>> > mandadory or inevitable either.
>> >
>> > If the API was mostly portable, then some implementations or modules
>> could
>> > be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
>> >
>> >
>> > Werner
>> >
>> >
>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>> > <rm...@gmail.com>
>> > wrote:
>> >
>> >> Hi guys,
>> >>
>> >> I know we said java 8 is good to start a project but this is a blocker
>> >> to make of tamaya built in config solution in project bound to java 7
>> >> like JavaEE 7 containers for instance.
>> >>
>> >> Since Java 8 doesn't bring anything on implemtation point of view we
>> >> mandate/cant replace by java 7 can we rethink about it?
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau
>> >> http://www.tomitribe.com
>> >> http://rmannibucau.wordpress.com
>> >> https://github.com/rmannibucau
>> >>
>> >
>>
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
As Java CDI 2 and EE 8 (some or all of its components will require Java SE
8 as prerequisite) have just started, none of them even produced an EDR, I
would also prefer starting with Java (EE) 7 for now.
If there are official releases during the incubator these allow the use
with stable, official and (Java EE 6 or 7) certified containers rather than
just an RI or even preview and Beta containers. Let's see, how much it
takes to graduate, maybe if Java EE 8 or CDI 2 are also final or close to
final, we could always switch to Java 8 then.
For a pure SE 8 standalone library like JavaMoney it may be worth starting
with SE 8, but Tamaya aims at Enterprise containers "first" so we should
stick to the final Enterprise standards IMHO not the next version that's
not going to be final till 2016/17.
Werner
On Tue, Jan 6, 2015 at 2:26 PM, Mark Struberg <st...@yahoo.de> wrote:
> I'm also still not convinced.
>
> Let's step back a few meters and simply compare the benefits vs the
> downsides
>
>
> - PRO
> * more 'modern'
> * Optional
> * Functions
> * default methods in interfaces
>
>
> - CON
> * not backward compatible
> * blocks adoption in current containers
> * blocks adoption in many user projects
> * we actually don't really need any of it's features
>
>
> Let's face it: JDK8 is still not production ready. It is somewhat slower
> than Java7 still and I honestly know no single big project which runs on
> Java8. Not even the JavaEE7 TCK passes on Java8...
>
>
>
> Ad Optional:
>
> The discussion we had was around Optional. The only impact it has on me
> now is that instead of
>
>
> if (blabla != null) {...}
>
> I've seen
>
> if (blabla.isPresent()) {..}
>
> Most code I've seen simply don't use the ?. chain notation because it only
> works for 'navigation' use cases. Which we barely have (except for
> programmatic default values, but there are perfectly valid alternative
> solutions as well).
>
>
>
> Ad Functions:
> I've not yet seen a benefit in our current API. Actually the only thing we
> use it for currently is to replace 2 Comparator instances. I don't think
> this is something we could't do with SE7 as well ;)
>
>
>
> Ad default methods in interfaces:
> Actually I'm not a huge fan of all those convenience functions in our
> Configuration interface anyway. It just makes it harder to read.
>
>
>
> What about adding either a branch or a module for java7?
>
> That way we could continue trying implement our core functionality with
> both. And at the end of the day we do a resume and weight up the pros and
> cons again.
>
> LieGrue,
> strub
>
>
>
>
> > On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com>
> wrote:
> > > Romain,
> >
> > That's a good point. I flagged this with e.g. JavaMoney. Given it aims
> more
> > at future platforms and e.g. java.util.Currency (or ICU4J) are already
> > available for Java 7 or even 6 and before, that seemed of less concern to
> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
> > theoretical ME usage of the API could work in a future version of Java
> > (ME), too.
> >
> > Here it's more about backward-compatibility, and looking at other Apache
> > projects like DeviceMap, etc. a majority requires at most Java 6 as
> minimum
> > version today. Some may have shifted to 7, but I couldn't think of an
> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
> > modules in DeltaSpike could eventually graduate to CDI 2 and require
> Java
> > SE 8, but a prior version of the same projects or modules will still work
> > with CDI 1.x and Java 7.
> >
> > There are a few "functional" aspects, but if you need to declare a
> > "Functional Interface" that works in Java 7 and 8 all you have to do
> > is
> > forget about the SE 8 annotation. It'll still work in 8 if declared
> right.
> > So we might have to declare some of the interfaces without the
> > @FunctionalInterface annotation (or comment it out for now) and refrain
> > from reusing those Java SE 8 provides. Stubbing them out with either
> config
> > specific or the same method names would be a solution.
> >
> > Optional was discussed in a hangout last night, and I wasn't under the
> > impression we would have to use it in places where a simple "null
> > check"
> > also works, so that doesn't look like a Java SE 8 feature to be seen as
> > mandadory or inevitable either.
> >
> > If the API was mostly portable, then some implementations or modules
> could
> > be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
> >
> >
> > Werner
> >
> >
> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > <rm...@gmail.com>
> > wrote:
> >
> >> Hi guys,
> >>
> >> I know we said java 8 is good to start a project but this is a blocker
> >> to make of tamaya built in config solution in project bound to java 7
> >> like JavaEE 7 containers for instance.
> >>
> >> Since Java 8 doesn't bring anything on implemtation point of view we
> >> mandate/cant replace by java 7 can we rethink about it?
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >
>
Re: java 8: really?
Posted by Anatole Tresch <at...@gmail.com>.
Sounds good, woll look at it tomorrow ;)
Mark Struberg <st...@yahoo.de> schrieb am Di., 6. Jan. 2015 um 23:54:
> I tried to do some small tricks and it was actually really easy to
> implement a java7 version and base our java8 version in backward compatible
> ways on it.
>
> I've pushed this to a fb-se7 branch on github.
>
> https://github.com/struberg/incubator-tamaya/tree/fb-se7
>
>
> The idea is to basically have 2 'versions' of the spec in one go.
>
> The java7/api module provides an api which builds perfectly fine with
> Java7.
>
> The java8/api module is 'backward compatible' to the Java7 api and adds
> the Optional etc features on top of it. I just had to tweak it a little bit.
>
> For now I just did the API, but the impl is even less of a problem. Trying
> to check what we could reuse for the java7 impl as well.
>
>
>
> LieGrue,
> strub
>
>
>
>
> > On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de>
> wrote:
> > > I do see the benefits of Java8 but I also do see that not many can use
> it in
> > production in the next 2 years. Thus it will not get adopted. We are in
> a phase
> > of transaction right now.
> >
> > That's the reason why I proposed to try out both of em and compare them
> when
> > we are done.
> >
> > Let me draft this up.
> >
> > LieGrue,
> > strub
> >
> >
> >
> >
> >
> >
> >> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
> > <rm...@gmail.com> wrote:
> >> > ok so let fork tamaya to support java 7, who will backport to java 8
> >> banch - yeah nobody will use j8 branch today?
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >>> Hi all
> >>>
> >>> I still think it is a real big mistake to go for Java 7. Do it in 8
> > and
> >>> provide a backport for 7. Not the other way round!
> >>> Some additional remarks inline:
> >>>
> >>> Cheers
> >>> Anatole
> >>>
> >>>
> >>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >>>
> >>>> I'm also still not convinced.
> >>>>
> >>>> Let's step back a few meters and simply compare the benefits
> > vs the
> >>>> downsides
> >>>>
> >>>>
> >>>> - PRO
> >>>> * more 'modern'
> >>>> * Optional
> >>>> * Functions
> >>>> * default methods in interfaces
> >>>>
> >>> + Streams
> >>> + extended functions on collections
> >>> + date time API
> >>> + concurrent improvements
> >>>
> >>>
> >>>
> >>>> - CON
> >>>> * not backward compatible
> >>>> * blocks adoption in current containers
> >>>>
> >>> -> no. the EE7 TCK is not running on Java 7, but the containers do!
> > Even
> >>> bigger companies like Credit Suisse are thinking on replacing the JDK
> >>> during next year.
> >>>
> >>>
> >>>
> >>>> * blocks adoption in many user projects
> >>>>
> >>> But as well is a prop compared to other libraries existing and will
> > for
> >>> sure boost support by other well known JUGs such as SouJava and LJC..
> >>>
> >>>
> >>>
> >>>> * we actually don't really need any of it's features
> >>>>
> >>> Of course, you can build things without it. But as I said, it is as
> > you
> >>> would build code in Java 1.4 without generics. One year later you
> will
> > have
> >>> to overhaul your API, or somebody else will come and do it in its own
> >>> project. And most important: a JSR based on Java 7 will never be
> > accepted
> >>> by the EC. So stop crying for the past, go for the future (and
> provide
> > a
> >>> backport - should be doable in 2-3 hours for a release).
> >>>
> >>>
> >>>
> >>>> Let's face it: JDK8 is still not production ready. It is
> > somewhat
> >> slower
> >>>> than Java7 still and I honestly know no single big project which
> > runs
> >> on
> >>>> Java8. Not even the JavaEE7 TCK passes on Java8..
> >>>
> >>> As I said before, I know also bigger companies that probably will go
> > to
> >>> Java 8 rather soon. And honestly I do not care. I wanted to build
> with
> > you
> >>> guys a modern API, not an outdated one ;)
> >>>
> >>>
> >>> Ad Optional:
> >>>>
> >>>> The discussion we had was around Optional. The only impact it has
> > on me
> >>>> now is that instead of
> >>>>
> >>>>
> >>>> if (blabla != null) {...}
> >>>>
> >>>> I've seen
> >>>>
> >>>> if (blabla.isPresent()) {..}
> >>>>
> >>>
> >>> Please read my blog as stated in one of my first mails related to the
> >>> topic.
> >>>
> >>> Instead of
> >>>
> >>> Optional<T> get(String)
> >>>
> >>> you get
> >>>
> >>> T get(String key);
> >>> T getOrDefault(String key);
> >>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> >>>
> >>> Also all this must be done on your own, no fluent API for it ;(
> >>>
> >>> Most code I've seen simply don't use the ?. chain notation
> > because
> >> it only
> >>>> works for 'navigation' use cases. Which we barely have
> > (except
> >> for
> >>>> programmatic default values, but there are perfectly valid
> > alternative
> >>>> solutions as well).
> >>>>
> >>> I think its more that many programmers still did not have really
> > worked
> >>> with Java 8. For me it sounds like "the farmer only eats what he
> >> knows".
> >>> After having worked with Java 8 for some months now, I will never go
> > back,
> >>> if not necessary, really.
> >>>
> >>>
> >>>> Ad Functions:
> >>>> I've not yet seen a benefit in our current API. Actually the
> > only
> >> thing we
> >>>> use it for currently is to replace 2 Comparator instances. I
> > don't
> >> think
> >>>> this is something we could't do with SE7 as well ;)
> >>>>
> >>> There are several cases where it has benefits, eg the additional
> > property
> >>> function in Filter. Without Java 8 you have to create an additional
> >>> interface for it. MOst advantages beside the new abstraction
> > possibilities
> >>> are in the implementation. Several things are so much easier with
> Java
> > 8...
> >>>
> >>> Ad default methods in interfaces:
> >>>> Actually I'm not a huge fan of all those convenience functions
> > in
> >> our
> >>>> Configuration interface anyway. It just makes it harder to read.
> >>>>
> >>> SE is different than EE. You don't have CDI that helps a lot.
> >> That's a
> >>> fact as it is. I as well wish there will be more. Perhaps we get with
> >>> Jigsaw some additional features, but I will not ask for going for
> Java
> > 9 as
> >>> a base for the API ;)
> >>> Harder to read is to some part also a matter of taste. When these
> > things
> >>> feel cumbersome, my personal reaction is, you should work more with
> > Java 8
> >>> and you will love that you have to write less abstract classes, you
> > dont
> >>> have to expose additional singletons for accessing things and you can
> >>> greatly help SPI implementors out of the API instead of providing
> > abstract
> >>> classes and create deps on your implementation...
> >>>
> >>>
> >>>
> >>>> What about adding either a branch or a module for java7?
> >>>>
> >>> Could be an option, as I always said.
> >>>
> >>>
> >>>
> >>> That way we could continue trying implement our core functionality
> > with
> >>>> both. And at the end of the day we do a resume and weight up the
> > pros
> >> and
> >>>> cons again.
> >>>>
> >>> No, go for 8 and provide 7 in parallel by the colleagues that wants
> > it.
> >>> Since you state it is so important for the next decade there will be
> > people
> >>> that do the work, I assume. And don't complain if it is more work
> > than
> >>> expected, because you have to write much more code because you are
> now
> > in
> >> 7.
> >>> But again, stop doing things for an outdated Java version, when you
> > are
> >>> building an API for a future JSR from scratch. It is simply useless
> > IMO.
> >>>
> >>>
> >>>
> >>>>
> >>>> LieGrue,
> >>>> strub
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> > On Friday, 2 January 2015, 14:02, Werner Keil
> >> <we...@gmail.com>
> >>>> wrote:
> >>>> > > Romain,
> >>>> >
> >>>> > That's a good point. I flagged this with e.g. JavaMoney.
> > Given
> >> it aims
> >>>> more
> >>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
> > are
> >> already
> >>>> > available for Java 7 or even 6 and before, that seemed of
> > less
> >> concern to
> >>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
> > or 9,
> >> so a
> >>>> > theoretical ME usage of the API could work in a future
> > version of
> >> Java
> >>>> > (ME), too.
> >>>> >
> >>>> > Here it's more about backward-compatibility, and looking
> > at
> >> other Apache
> >>>> > projects like DeviceMap, etc. a majority requires at most
> > Java 6
> >> as
> >>>> minimum
> >>>> > version today. Some may have shifted to 7, but I couldn't
> >
> >> think of an
> >>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
> > that, so
> >> some
> >>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
> >> require
> >>>> Java
> >>>> > SE 8, but a prior version of the same projects or modules
> > will
> >> still work
> >>>> > with CDI 1.x and Java 7.
> >>>> >
> >>>> > There are a few "functional" aspects, but if you
> > need to
> >> declare a
> >>>> > "Functional Interface" that works in Java 7 and 8
> > all
> >> you have to do
> >>>> > is
> >>>> > forget about the SE 8 annotation. It'll still work in 8
> > if
> >> declared
> >>>> right.
> >>>> > So we might have to declare some of the interfaces without
> > the
> >>>> > @FunctionalInterface annotation (or comment it out for now)
> > and
> >> refrain
> >>>> > from reusing those Java SE 8 provides. Stubbing them out with
> >
> >> either
> >>>> config
> >>>> > specific or the same method names would be a solution.
> >>>> >
> >>>> > Optional was discussed in a hangout last night, and I
> > wasn't
> >> under the
> >>>> > impression we would have to use it in places where a simple
> >> "null
> >>>> > check"
> >>>> > also works, so that doesn't look like a Java SE 8 feature
> > to
> >> be seen as
> >>>> > mandadory or inevitable either.
> >>>> >
> >>>> > If the API was mostly portable, then some implementations or
> >
> >> modules
> >>>> could
> >>>> > be SE 8 Specific. I heard, that is somehow like Spring does
> > it,
> >> too;-)
> >>>> >
> >>>> >
> >>>> > Werner
> >>>> >
> >>>> >
> >>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> >>>> > <rm...@gmail.com>
> >>>> > wrote:
> >>>> >
> >>>> >> Hi guys,
> >>>> >>
> >>>> >> I know we said java 8 is good to start a project but
> > this is
> >> a blocker
> >>>> >> to make of tamaya built in config solution in project
> > bound
> >> to java 7
> >>>> >> like JavaEE 7 containers for instance.
> >>>> >>
> >>>> >> Since Java 8 doesn't bring anything on implemtation
> > point
> >> of view we
> >>>> >> mandate/cant replace by java 7 can we rethink about it?
> >>>> >>
> >>>> >>
> >>>> >> Romain Manni-Bucau
> >>>> >> @rmannibucau
> >>>> >> http://www.tomitribe.com
> >>>> >> http://rmannibucau.wordpress.com
> >>>> >> https://github.com/rmannibucau
> >>>> >>
> >>>> >
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> *Anatole Tresch*
> >>> Java Engineer & Architect, JSR Spec Lead
> >>> Glärnischweg 10
> >>> CH - 8620 Wetzikon
> >>>
> >>> *Switzerland, Europe Zurich, GMT+1*
> >>> *Twitter: @atsticks*
> >>> *Blogs: **http://javaremarkables.blogspot.ch/
> >>> <http://javaremarkables.blogspot.ch/>*
> >>>
> >>> *Google: atsticksMobile +41-76 344 62 79*
> >>
> >
>
RE: java 8: really?
Posted by "Tresch, Anatole " <an...@credit-suisse.com>.
Hi Mark
I am fine with the ConfigurationProvider in java 8. One consideration would be to deprecate it in favor of the new method. If not we might be stick on the ConfigProvider. But having both in parallel is perhaps confusing...
About binary compatibility of Lambdas with Java 7 compiled code I do not know the defaults. The 2 interfaces are for sure functional interfaces in Java 8 and interface implemented previously must run in Java 8 as well. I hope
that Lambdas written in Java 8 will similarly run with the library compiled in Java 7, but executed on Java 8. Perhaps you know the answer here...
-----Original Message-----
From: Mark Struberg [mailto:struberg@yahoo.de]
Sent: Mittwoch, 7. Januar 2015 16:23
To: dev@tamaya.incubator.apache.org
Subject: Re: java 8: really?
I'm fine with adding those. But that might as well be seen as substantial benefit of the Java8 interface.
I'm not sure if we could easily keep it compatible. The java8 interface should be binary compatible to the java7 version.
It should be possible to start with the Java7 api+impl in your application and once you upgrade to Java8 then take the java8 api version and it still should work. Of course the other way around is not supported.
Remember that in that case the java8-api would need to be 'backward compatible' to the java7-api. That was also the reason why I also added the ConfigurationProvider class with it's static accessor method to the java8 module. It's just there for full compatibility.
LieGrue,
strub
> On Wednesday, 7 January 2015, 16:07, "Tresch, Anatole" <an...@credit-suisse.com> wrote:
> > Hi Mark
>
> I am almost fine with it. One thing I missed in the java7 version are the with
> and query functions. I think these are important parts for future extendibility
> and can simply be implemented in Java 7 manner, by adding
>
> interface ConfigurationOperator {
> Configuration operate(Configuration config);
> }
>
> interface ConfigurationQuery<T>{
> <T> T query(Configuration config);
> }
>
> and then on Configuration:
>
> Configuration with(ConfigurationOperator op);
> <T> T query(ConfigurationQuery<T> query);
>
>
> Anatole
>
>
>
> -----Original Message-----
> From: Mark Struberg [mailto:struberg@yahoo.de]
> Sent: Mittwoch, 7. Januar 2015 15:50
> To: dev@tamaya.incubator.apache.org
> Subject: Re: java 8: really?
>
> Yes, back to the Java7 + Java8 API approach. Anyone likes to dig deeper still,
> or can I commit it?
>
> I showed that it's perfectly possible to have both. That would have the
> benefit that we would get quick adoption in current containers but also support
> Java8 style.
>
> LieGrue,
> strub
>
>
>
>
>
>> On Wednesday, 7 January 2015, 14:03, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> > can we try to avoid to cross discuss across trheads?
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>>
>> 2015-01-07 12:58 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>>
>>>
>>>> On Wednesday, 7 January 2015, 12:02, Werner Keil
>> <we...@gmail.com> wrote:
>>>> > Btw. it partly relates to the Configuration.current()
> discussion,
>> as
>>>> designing a static (and default) method on an interface
> Configuration
>> makes
>>>
>>>> a fully compliant "drop in" backport nearly impossible.
>>>
>>> Not a problem at all because a container and even a user can easily
> swap
>> out the ServiceContext himself. So this works out of the box for most
> users. And
>> if not then it's pretty easy to adopt it to unknown environments.
>>>
>>> LieGrue,
>>> strub
>>
>
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
I'm fine with adding those. But that might as well be seen as substantial benefit of the Java8 interface.
I'm not sure if we could easily keep it compatible. The java8 interface should be binary compatible to the java7 version.
It should be possible to start with the Java7 api+impl in your application and once you upgrade to Java8 then take the java8 api version and it still should work. Of course the other way around is not supported.
Remember that in that case the java8-api would need to be 'backward compatible' to the java7-api. That was also the reason why I also added the ConfigurationProvider class with it's static accessor method to the java8 module. It's just there for full compatibility.
LieGrue,
strub
> On Wednesday, 7 January 2015, 16:07, "Tresch, Anatole" <an...@credit-suisse.com> wrote:
> > Hi Mark
>
> I am almost fine with it. One thing I missed in the java7 version are the with
> and query functions. I think these are important parts for future extendibility
> and can simply be implemented in Java 7 manner, by adding
>
> interface ConfigurationOperator {
> Configuration operate(Configuration config);
> }
>
> interface ConfigurationQuery<T>{
> <T> T query(Configuration config);
> }
>
> and then on Configuration:
>
> Configuration with(ConfigurationOperator op);
> <T> T query(ConfigurationQuery<T> query);
>
>
> Anatole
>
>
>
> -----Original Message-----
> From: Mark Struberg [mailto:struberg@yahoo.de]
> Sent: Mittwoch, 7. Januar 2015 15:50
> To: dev@tamaya.incubator.apache.org
> Subject: Re: java 8: really?
>
> Yes, back to the Java7 + Java8 API approach. Anyone likes to dig deeper still,
> or can I commit it?
>
> I showed that it's perfectly possible to have both. That would have the
> benefit that we would get quick adoption in current containers but also support
> Java8 style.
>
> LieGrue,
> strub
>
>
>
>
>
>> On Wednesday, 7 January 2015, 14:03, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> > can we try to avoid to cross discuss across trheads?
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>>
>> 2015-01-07 12:58 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>>
>>>
>>>> On Wednesday, 7 January 2015, 12:02, Werner Keil
>> <we...@gmail.com> wrote:
>>>> > Btw. it partly relates to the Configuration.current()
> discussion,
>> as
>>>> designing a static (and default) method on an interface
> Configuration
>> makes
>>>
>>>> a fully compliant "drop in" backport nearly impossible.
>>>
>>> Not a problem at all because a container and even a user can easily
> swap
>> out the ServiceContext himself. So this works out of the box for most
> users. And
>> if not then it's pretty easy to adopt it to unknown environments.
>>>
>>> LieGrue,
>>> strub
>>
>
RE: java 8: really?
Posted by "Tresch, Anatole " <an...@credit-suisse.com>.
Hi Mark
I am almost fine with it. One thing I missed in the java7 version are the with and query functions. I think these are important parts for future extendibility and can simply be implemented in Java 7 manner, by adding
interface ConfigurationOperator {
Configuration operate(Configuration config);
}
interface ConfigurationQuery<T>{
<T> T query(Configuration config);
}
and then on Configuration:
Configuration with(ConfigurationOperator op);
<T> T query(ConfigurationQuery<T> query);
Anatole
-----Original Message-----
From: Mark Struberg [mailto:struberg@yahoo.de]
Sent: Mittwoch, 7. Januar 2015 15:50
To: dev@tamaya.incubator.apache.org
Subject: Re: java 8: really?
Yes, back to the Java7 + Java8 API approach. Anyone likes to dig deeper still, or can I commit it?
I showed that it's perfectly possible to have both. That would have the benefit that we would get quick adoption in current containers but also support Java8 style.
LieGrue,
strub
> On Wednesday, 7 January 2015, 14:03, Romain Manni-Bucau <rm...@gmail.com> wrote:
> > can we try to avoid to cross discuss across trheads?
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
>
> 2015-01-07 12:58 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>
>>
>>> On Wednesday, 7 January 2015, 12:02, Werner Keil
> <we...@gmail.com> wrote:
>>> > Btw. it partly relates to the Configuration.current() discussion,
> as
>>> designing a static (and default) method on an interface Configuration
> makes
>>
>>> a fully compliant "drop in" backport nearly impossible.
>>
>> Not a problem at all because a container and even a user can easily swap
> out the ServiceContext himself. So this works out of the box for most users. And
> if not then it's pretty easy to adopt it to unknown environments.
>>
>> LieGrue,
>> strub
>
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
Yes, back to the Java7 + Java8 API approach. Anyone likes to dig deeper still, or can I commit it?
I showed that it's perfectly possible to have both. That would have the benefit that we would get quick adoption in current containers but also support Java8 style.
LieGrue,
strub
> On Wednesday, 7 January 2015, 14:03, Romain Manni-Bucau <rm...@gmail.com> wrote:
> > can we try to avoid to cross discuss across trheads?
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
>
> 2015-01-07 12:58 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>
>>
>>> On Wednesday, 7 January 2015, 12:02, Werner Keil
> <we...@gmail.com> wrote:
>>> > Btw. it partly relates to the Configuration.current() discussion,
> as
>>> designing a static (and default) method on an interface Configuration
> makes
>>
>>> a fully compliant "drop in" backport nearly impossible.
>>
>> Not a problem at all because a container and even a user can easily swap
> out the ServiceContext himself. So this works out of the box for most users. And
> if not then it's pretty easy to adopt it to unknown environments.
>>
>> LieGrue,
>> strub
>
Re: java 8: really?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
can we try to avoid to cross discuss across trheads?
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-07 12:58 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>
>
>> On Wednesday, 7 January 2015, 12:02, Werner Keil <we...@gmail.com> wrote:
>> > Btw. it partly relates to the Configuration.current() discussion, as
>> designing a static (and default) method on an interface Configuration makes
>
>> a fully compliant "drop in" backport nearly impossible.
>
> Not a problem at all because a container and even a user can easily swap out the ServiceContext himself. So this works out of the box for most users. And if not then it's pretty easy to adopt it to unknown environments.
>
> LieGrue,
> strub
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
> On Wednesday, 7 January 2015, 12:02, Werner Keil <we...@gmail.com> wrote:
> > Btw. it partly relates to the Configuration.current() discussion, as
> designing a static (and default) method on an interface Configuration makes
> a fully compliant "drop in" backport nearly impossible.
Not a problem at all because a container and even a user can easily swap out the ServiceContext himself. So this works out of the box for most users. And if not then it's pretty easy to adopt it to unknown environments.
LieGrue,
strub
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
Btw. it partly relates to the Configuration.current() discussion, as
designing a static (and default) method on an interface Configuration makes
a fully compliant "drop in" backport nearly impossible.
We have a small number of RI level interfaces in JSR 363 and while it's a
no-go for the API (which must work as far back as at least to Java SE 6
Embedded, in theory a LTS customer could even use it with Java 5 as of now)
to put something like Unit.of() there, the Measurement interface can have
this in the Java SE (8) port, but for the Reference Implementation the same
method would only work in an abstract base class like AbstractMeasurement
or another class.
CDI is a class, so in a Java 7 or 6+ backport one would have to add
current() to a concrete class implementing Configuration, not the actual
interface.
Same for the default implementation.
Werner
On Wed, Jan 7, 2015 at 11:56 AM, Werner Keil <we...@gmail.com> wrote:
> I'd rather say that's for Java 6;-D
> See http://www.oracle.com/technetwork/java/eol-135779.html
> What matters to most big customers would be the "Extended Support" and it
> earns Oracle some money, too;-)
> As you can see Java 5 ends its Extended Support this May, Java 6 won't
> till the next World Cup (likely in Russia;-) and Java 7 still gets this
> support level till the World Cup 2022 in Qatar.
>
> Among the reasons why we support the broadest range possible in the JSR
> 363 API, especially in the Embedded sector where companies "bake" Java
> Embedded into devices they send to Alaska, Fukushima or the bottom of the
> ocean (see James Gosling's company;-) and rarely have access to them or
> bother upgrading before they really have to or the customer reports a
> problem with the solution.
>
> Werner
>
> On Wed, Jan 7, 2015 at 12:15 AM, Mark Struberg <st...@yahoo.de> wrote:
>
>> > IMHO, the project is born and create a project without lost
>>
>> > some cool improvements such Lambda, stream, optional, etc.
>>
>> The only thing we really used was Optional. This was really easy to get
>> going as default method in 8 as well. Look at the code, I really didn't
>> change much.
>>
>>
>> > The Java 7 will dead on April.
>>
>> Hah, good joke. Oracle will not manage to hold their EOL. I expect it to
>> be somewhen 2016 or 2017.
>>
>> Java8 is just not stable enough for production yet.
>>
>>
>>
>> LieGrue,
>> strub
>>
>>
>>
>> On Wednesday, 7 January 2015, 0:05, Otávio Gonçalves de Santana <
>> otaviopolianasantana@gmail.com> wrote:
>> >
>> >
>> >Great!, but manager two projects with the same functions may stay
>> difficult with the time.
>> >IMHO, the project is born and create a project without lost some cool
>> improvements such Lambda, stream, optional, etc. The Java 7 will dead on
>> April. The new projects such CDI 2.0, JSON-B, and another sub-components in
>> Java EE 8, are using the Java 8 as minimum requirement.
>> >
>> >
>> >On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de> wrote:
>> >
>> >I tried to do some small tricks and it was actually really easy to
>> implement a java7 version and base our java8 version in backward compatible
>> ways on it.
>> >>
>> >>I've pushed this to a fb-se7 branch on github.
>> >>
>> >>https://github.com/struberg/incubator-tamaya/tree/fb-se7
>> >>
>> >>
>> >>The idea is to basically have 2 'versions' of the spec in one go.
>> >>
>> >>The java7/api module provides an api which builds perfectly fine with
>> Java7.
>> >>
>> >>The java8/api module is 'backward compatible' to the Java7 api and adds
>> the Optional etc features on top of it. I just had to tweak it a little bit.
>> >>
>> >>For now I just did the API, but the impl is even less of a problem.
>> Trying to check what we could reuse for the java7 impl as well.
>> >>
>> >>
>> >>
>> >>LieGrue,
>> >>strub
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>> On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de>
>> wrote:
>> >>> > I do see the benefits of Java8 but I also do see that not many can
>> use it in
>> >>> production in the next 2 years. Thus it will not get adopted. We are
>> in a phase
>> >>> of transaction right now.
>> >>>
>> >>> That's the reason why I proposed to try out both of em and compare
>> them when
>> >>> we are done.
>> >>>
>> >>> Let me draft this up.
>> >>>
>> >>> LieGrue,
>> >>> strub
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
>> >>> <rm...@gmail.com> wrote:
>> >>>> > ok so let fork tamaya to support java 7, who will backport to
>> java 8
>> >>>> banch - yeah nobody will use j8 branch today?
>> >>>>
>> >>>>
>> >>>> Romain Manni-Bucau
>> >>>> @rmannibucau
>> >>>> http://www.tomitribe.com
>> >>>> http://rmannibucau.wordpress.com
>> >>>> https://github.com/rmannibucau
>> >>>>
>> >>>>
>> >>>>
>> >>>> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> >>>>> Hi all
>> >>>>>
>> >>>>> I still think it is a real big mistake to go for Java 7. Do it in
>> 8
>> >>> and
>> >>>>> provide a backport for 7. Not the other way round!
>> >>>>> Some additional remarks inline:
>> >>>>>
>> >>>>> Cheers
>> >>>>> Anatole
>> >>>>>
>> >>>>>
>> >>>>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>> >>>>>
>> >>>>>> I'm also still not convinced.
>> >>>>>>
>> >>>>>> Let's step back a few meters and simply compare the benefits
>> >>> vs the
>> >>>>>> downsides
>> >>>>>>
>> >>>>>>
>> >>>>>> - PRO
>> >>>>>> * more 'modern'
>> >>>>>> * Optional
>> >>>>>> * Functions
>> >>>>>> * default methods in interfaces
>> >>>>>>
>> >>>>> + Streams
>> >>>>> + extended functions on collections
>> >>>>> + date time API
>> >>>>> + concurrent improvements
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>> - CON
>> >>>>>> * not backward compatible
>> >>>>>> * blocks adoption in current containers
>> >>>>>>
>> >>>>> -> no. the EE7 TCK is not running on Java 7, but the containers
>> do!
>> >>> Even
>> >>>>> bigger companies like Credit Suisse are thinking on replacing the
>> JDK
>> >>>>> during next year.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>> * blocks adoption in many user projects
>> >>>>>>
>> >>>>> But as well is a prop compared to other libraries existing and
>> will
>> >>> for
>> >>>>> sure boost support by other well known JUGs such as SouJava and
>> LJC..
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>> * we actually don't really need any of it's features
>> >>>>>>
>> >>>>> Of course, you can build things without it. But as I said, it is
>> as
>> >>> you
>> >>>>> would build code in Java 1.4 without generics. One year later you
>> will
>> >>> have
>> >>>>> to overhaul your API, or somebody else will come and do it in its
>> own
>> >>>>> project. And most important: a JSR based on Java 7 will never be
>> >>> accepted
>> >>>>> by the EC. So stop crying for the past, go for the future (and
>> provide
>> >>> a
>> >>>>> backport - should be doable in 2-3 hours for a release).
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>> Let's face it: JDK8 is still not production ready. It is
>> >>> somewhat
>> >>>> slower
>> >>>>>> than Java7 still and I honestly know no single big project which
>> >>> runs
>> >>>> on
>> >>>>>> Java8. Not even the JavaEE7 TCK passes on Java8..
>> >>>>>
>> >>>>> As I said before, I know also bigger companies that probably will
>> go
>> >>> to
>> >>>>> Java 8 rather soon. And honestly I do not care. I wanted to build
>> with
>> >>> you
>> >>>>> guys a modern API, not an outdated one ;)
>> >>>>>
>> >>>>>
>> >>>>> Ad Optional:
>> >>>>>>
>> >>>>>> The discussion we had was around Optional. The only impact it has
>> >>> on me
>> >>>>>> now is that instead of
>> >>>>>>
>> >>>>>>
>> >>>>>> if (blabla != null) {...}
>> >>>>>>
>> >>>>>> I've seen
>> >>>>>>
>> >>>>>> if (blabla.isPresent()) {..}
>> >>>>>>
>> >>>>>
>> >>>>> Please read my blog as stated in one of my first mails related to
>> the
>> >>>>> topic.
>> >>>>>
>> >>>>> Instead of
>> >>>>>
>> >>>>> Optional<T> get(String)
>> >>>>>
>> >>>>> you get
>> >>>>>
>> >>>>> T get(String key);
>> >>>>> T getOrDefault(String key);
>> >>>>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>> >>>>>
>> >>>>> Also all this must be done on your own, no fluent API for it ;(
>> >>>>>
>> >>>>> Most code I've seen simply don't use the ?. chain notation
>> >>> because
>> >>>> it only
>> >>>>>> works for 'navigation' use cases. Which we barely have
>> >>> (except
>> >>>> for
>> >>>>>> programmatic default values, but there are perfectly valid
>> >>> alternative
>> >>>>>> solutions as well).
>> >>>>>>
>> >>>>> I think its more that many programmers still did not have really
>> >>> worked
>> >>>>> with Java 8. For me it sounds like "the farmer only eats what he
>> >>>> knows".
>> >>>>> After having worked with Java 8 for some months now, I will never
>> go
>> >>> back,
>> >>>>> if not necessary, really.
>> >>>>>
>> >>>>>
>> >>>>>> Ad Functions:
>> >>>>>> I've not yet seen a benefit in our current API. Actually the
>> >>> only
>> >>>> thing we
>> >>>>>> use it for currently is to replace 2 Comparator instances. I
>> >>> don't
>> >>>> think
>> >>>>>> this is something we could't do with SE7 as well ;)
>> >>>>>>
>> >>>>> There are several cases where it has benefits, eg the additional
>> >>> property
>> >>>>> function in Filter. Without Java 8 you have to create an
>> additional
>> >>>>> interface for it. MOst advantages beside the new abstraction
>> >>> possibilities
>> >>>>> are in the implementation. Several things are so much easier with
>> Java
>> >>> 8...
>> >>>>>
>> >>>>> Ad default methods in interfaces:
>> >>>>>> Actually I'm not a huge fan of all those convenience functions
>> >>> in
>> >>>> our
>> >>>>>> Configuration interface anyway. It just makes it harder to read.
>> >>>>>>
>> >>>>> SE is different than EE. You don't have CDI that helps a lot.
>> >>>> That's a
>> >>>>> fact as it is. I as well wish there will be more. Perhaps we get
>> with
>> >>>>> Jigsaw some additional features, but I will not ask for going for
>> Java
>> >>> 9 as
>> >>>>> a base for the API ;)
>> >>>>> Harder to read is to some part also a matter of taste. When these
>> >>> things
>> >>>>> feel cumbersome, my personal reaction is, you should work more
>> with
>> >>> Java 8
>> >>>>> and you will love that you have to write less abstract classes,
>> you
>> >>> dont
>> >>>>> have to expose additional singletons for accessing things and you
>> can
>> >>>>> greatly help SPI implementors out of the API instead of providing
>> >>> abstract
>> >>>>> classes and create deps on your implementation...
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>> What about adding either a branch or a module for java7?
>> >>>>>>
>> >>>>> Could be an option, as I always said.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> That way we could continue trying implement our core functionality
>> >>> with
>> >>>>>> both. And at the end of the day we do a resume and weight up the
>> >>> pros
>> >>>> and
>> >>>>>> cons again.
>> >>>>>>
>> >>>>> No, go for 8 and provide 7 in parallel by the colleagues that
>> wants
>> >>> it.
>> >>>>> Since you state it is so important for the next decade there will
>> be
>> >>> people
>> >>>>> that do the work, I assume. And don't complain if it is more work
>> >>> than
>> >>>>> expected, because you have to write much more code because you
>> are now
>> >>> in
>> >>>> 7.
>> >>>>> But again, stop doing things for an outdated Java version, when
>> you
>> >>> are
>> >>>>> building an API for a future JSR from scratch. It is simply
>> useless
>> >>> IMO.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>>
>> >>>>>> LieGrue,
>> >>>>>> strub
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> > On Friday, 2 January 2015, 14:02, Werner Keil
>> >>>> <we...@gmail.com>
>> >>>>>> wrote:
>> >>>>>> > > Romain,
>> >>>>>> >
>> >>>>>> > That's a good point. I flagged this with e.g. JavaMoney.
>> >>> Given
>> >>>> it aims
>> >>>>>> more
>> >>>>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
>> >>> are
>> >>>> already
>> >>>>>> > available for Java 7 or even 6 and before, that seemed of
>> >>> less
>> >>>> concern to
>> >>>>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
>> >>> or 9,
>> >>>> so a
>> >>>>>> > theoretical ME usage of the API could work in a future
>> >>> version of
>> >>>> Java
>> >>>>>> > (ME), too.
>> >>>>>> >
>> >>>>>> > Here it's more about backward-compatibility, and looking
>> >>> at
>> >>>> other Apache
>> >>>>>> > projects like DeviceMap, etc. a majority requires at most
>> >>> Java 6
>> >>>> as
>> >>>>>> minimum
>> >>>>>> > version today. Some may have shifted to 7, but I couldn't
>> >>>
>> >>>> think of an
>> >>>>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
>> >>> that, so
>> >>>> some
>> >>>>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
>> >>>> require
>> >>>>>> Java
>> >>>>>> > SE 8, but a prior version of the same projects or modules
>> >>> will
>> >>>> still work
>> >>>>>> > with CDI 1.x and Java 7.
>> >>>>>> >
>> >>>>>> > There are a few "functional" aspects, but if you
>> >>> need to
>> >>>> declare a
>> >>>>>> > "Functional Interface" that works in Java 7 and 8
>> >>> all
>> >>>> you have to do
>> >>>>>> > is
>> >>>>>> > forget about the SE 8 annotation. It'll still work in 8
>> >>> if
>> >>>> declared
>> >>>>>> right.
>> >>>>>> > So we might have to declare some of the interfaces without
>> >>> the
>> >>>>>> > @FunctionalInterface annotation (or comment it out for now)
>> >>> and
>> >>>> refrain
>> >>>>>> > from reusing those Java SE 8 provides. Stubbing them out with
>> >>>
>> >>>> either
>> >>>>>> config
>> >>>>>> > specific or the same method names would be a solution.
>> >>>>>> >
>> >>>>>> > Optional was discussed in a hangout last night, and I
>> >>> wasn't
>> >>>> under the
>> >>>>>> > impression we would have to use it in places where a simple
>> >>>> "null
>> >>>>>> > check"
>> >>>>>> > also works, so that doesn't look like a Java SE 8 feature
>> >>> to
>> >>>> be seen as
>> >>>>>> > mandadory or inevitable either.
>> >>>>>> >
>> >>>>>> > If the API was mostly portable, then some implementations or
>> >>>
>> >>>> modules
>> >>>>>> could
>> >>>>>> > be SE 8 Specific. I heard, that is somehow like Spring does
>> >>> it,
>> >>>> too;-)
>> >>>>>> >
>> >>>>>> >
>> >>>>>> > Werner
>> >>>>>> >
>> >>>>>> >
>> >>>>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>> >>>>>> > <rm...@gmail.com>
>> >>>>>> > wrote:
>> >>>>>> >
>> >>>>>> >> Hi guys,
>> >>>>>> >>
>> >>>>>> >> I know we said java 8 is good to start a project but
>> >>> this is
>> >>>> a blocker
>> >>>>>> >> to make of tamaya built in config solution in project
>> >>> bound
>> >>>> to java 7
>> >>>>>> >> like JavaEE 7 containers for instance.
>> >>>>>> >>
>> >>>>>> >> Since Java 8 doesn't bring anything on implemtation
>> >>> point
>> >>>> of view we
>> >>>>>> >> mandate/cant replace by java 7 can we rethink about it?
>> >>>>>> >>
>> >>>>>> >>
>> >>>>>> >> Romain Manni-Bucau
>> >>>>>> >> @rmannibucau
>> >>>>>> >> http://www.tomitribe.com
>> >>>>>> >> http://rmannibucau.wordpress.com
>> >>>>>> >> https://github.com/rmannibucau
>> >>>>>> >>
>> >>>>>> >
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> *Anatole Tresch*
>> >>>>> Java Engineer & Architect, JSR Spec Lead
>> >>>>> Glärnischweg 10
>> >>>>> CH - 8620 Wetzikon
>> >>>>>
>> >>>>> *Switzerland, Europe Zurich, GMT+1*
>> >>>>> *Twitter: @atsticks*
>> >>>>> *Blogs: **http://javaremarkables.blogspot.ch/
>> >>>>> <http://javaremarkables.blogspot.ch/>*
>> >>>>>
>> >>>>> *Google: atsticksMobile +41-76 344 62 79*
>> >>>>
>> >>>
>> >>
>> >
>> >
>> >
>> >--
>> >
>> >Otávio Gonçalves de Santana
>> >
>> >
>> >blog: http://otaviosantana.blogspot.com.br/
>> >twitter: http://twitter.com/otaviojava
>> >site: http://about.me/otaviojava
>> >55 (11) 98255-3513
>> >
>> >
>> >
>> >
>>
>
>
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
I'd rather say that's for Java 6;-D
See http://www.oracle.com/technetwork/java/eol-135779.html
What matters to most big customers would be the "Extended Support" and it
earns Oracle some money, too;-)
As you can see Java 5 ends its Extended Support this May, Java 6 won't till
the next World Cup (likely in Russia;-) and Java 7 still gets this support
level till the World Cup 2022 in Qatar.
Among the reasons why we support the broadest range possible in the JSR 363
API, especially in the Embedded sector where companies "bake" Java Embedded
into devices they send to Alaska, Fukushima or the bottom of the ocean (see
James Gosling's company;-) and rarely have access to them or bother
upgrading before they really have to or the customer reports a problem with
the solution.
Werner
On Wed, Jan 7, 2015 at 12:15 AM, Mark Struberg <st...@yahoo.de> wrote:
> > IMHO, the project is born and create a project without lost
>
> > some cool improvements such Lambda, stream, optional, etc.
>
> The only thing we really used was Optional. This was really easy to get
> going as default method in 8 as well. Look at the code, I really didn't
> change much.
>
>
> > The Java 7 will dead on April.
>
> Hah, good joke. Oracle will not manage to hold their EOL. I expect it to
> be somewhen 2016 or 2017.
>
> Java8 is just not stable enough for production yet.
>
>
>
> LieGrue,
> strub
>
>
>
> On Wednesday, 7 January 2015, 0:05, Otávio Gonçalves de Santana <
> otaviopolianasantana@gmail.com> wrote:
> >
> >
> >Great!, but manager two projects with the same functions may stay
> difficult with the time.
> >IMHO, the project is born and create a project without lost some cool
> improvements such Lambda, stream, optional, etc. The Java 7 will dead on
> April. The new projects such CDI 2.0, JSON-B, and another sub-components in
> Java EE 8, are using the Java 8 as minimum requirement.
> >
> >
> >On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de> wrote:
> >
> >I tried to do some small tricks and it was actually really easy to
> implement a java7 version and base our java8 version in backward compatible
> ways on it.
> >>
> >>I've pushed this to a fb-se7 branch on github.
> >>
> >>https://github.com/struberg/incubator-tamaya/tree/fb-se7
> >>
> >>
> >>The idea is to basically have 2 'versions' of the spec in one go.
> >>
> >>The java7/api module provides an api which builds perfectly fine with
> Java7.
> >>
> >>The java8/api module is 'backward compatible' to the Java7 api and adds
> the Optional etc features on top of it. I just had to tweak it a little bit.
> >>
> >>For now I just did the API, but the impl is even less of a problem.
> Trying to check what we could reuse for the java7 impl as well.
> >>
> >>
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >>
> >>
> >>
> >>> On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de>
> wrote:
> >>> > I do see the benefits of Java8 but I also do see that not many can
> use it in
> >>> production in the next 2 years. Thus it will not get adopted. We are
> in a phase
> >>> of transaction right now.
> >>>
> >>> That's the reason why I proposed to try out both of em and compare
> them when
> >>> we are done.
> >>>
> >>> Let me draft this up.
> >>>
> >>> LieGrue,
> >>> strub
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
> >>> <rm...@gmail.com> wrote:
> >>>> > ok so let fork tamaya to support java 7, who will backport to java
> 8
> >>>> banch - yeah nobody will use j8 branch today?
> >>>>
> >>>>
> >>>> Romain Manni-Bucau
> >>>> @rmannibucau
> >>>> http://www.tomitribe.com
> >>>> http://rmannibucau.wordpress.com
> >>>> https://github.com/rmannibucau
> >>>>
> >>>>
> >>>>
> >>>> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >>>>> Hi all
> >>>>>
> >>>>> I still think it is a real big mistake to go for Java 7. Do it in 8
> >>> and
> >>>>> provide a backport for 7. Not the other way round!
> >>>>> Some additional remarks inline:
> >>>>>
> >>>>> Cheers
> >>>>> Anatole
> >>>>>
> >>>>>
> >>>>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >>>>>
> >>>>>> I'm also still not convinced.
> >>>>>>
> >>>>>> Let's step back a few meters and simply compare the benefits
> >>> vs the
> >>>>>> downsides
> >>>>>>
> >>>>>>
> >>>>>> - PRO
> >>>>>> * more 'modern'
> >>>>>> * Optional
> >>>>>> * Functions
> >>>>>> * default methods in interfaces
> >>>>>>
> >>>>> + Streams
> >>>>> + extended functions on collections
> >>>>> + date time API
> >>>>> + concurrent improvements
> >>>>>
> >>>>>
> >>>>>
> >>>>>> - CON
> >>>>>> * not backward compatible
> >>>>>> * blocks adoption in current containers
> >>>>>>
> >>>>> -> no. the EE7 TCK is not running on Java 7, but the containers do!
> >>> Even
> >>>>> bigger companies like Credit Suisse are thinking on replacing the
> JDK
> >>>>> during next year.
> >>>>>
> >>>>>
> >>>>>
> >>>>>> * blocks adoption in many user projects
> >>>>>>
> >>>>> But as well is a prop compared to other libraries existing and will
> >>> for
> >>>>> sure boost support by other well known JUGs such as SouJava and
> LJC..
> >>>>>
> >>>>>
> >>>>>
> >>>>>> * we actually don't really need any of it's features
> >>>>>>
> >>>>> Of course, you can build things without it. But as I said, it is as
> >>> you
> >>>>> would build code in Java 1.4 without generics. One year later you
> will
> >>> have
> >>>>> to overhaul your API, or somebody else will come and do it in its
> own
> >>>>> project. And most important: a JSR based on Java 7 will never be
> >>> accepted
> >>>>> by the EC. So stop crying for the past, go for the future (and
> provide
> >>> a
> >>>>> backport - should be doable in 2-3 hours for a release).
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Let's face it: JDK8 is still not production ready. It is
> >>> somewhat
> >>>> slower
> >>>>>> than Java7 still and I honestly know no single big project which
> >>> runs
> >>>> on
> >>>>>> Java8. Not even the JavaEE7 TCK passes on Java8..
> >>>>>
> >>>>> As I said before, I know also bigger companies that probably will
> go
> >>> to
> >>>>> Java 8 rather soon. And honestly I do not care. I wanted to build
> with
> >>> you
> >>>>> guys a modern API, not an outdated one ;)
> >>>>>
> >>>>>
> >>>>> Ad Optional:
> >>>>>>
> >>>>>> The discussion we had was around Optional. The only impact it has
> >>> on me
> >>>>>> now is that instead of
> >>>>>>
> >>>>>>
> >>>>>> if (blabla != null) {...}
> >>>>>>
> >>>>>> I've seen
> >>>>>>
> >>>>>> if (blabla.isPresent()) {..}
> >>>>>>
> >>>>>
> >>>>> Please read my blog as stated in one of my first mails related to
> the
> >>>>> topic.
> >>>>>
> >>>>> Instead of
> >>>>>
> >>>>> Optional<T> get(String)
> >>>>>
> >>>>> you get
> >>>>>
> >>>>> T get(String key);
> >>>>> T getOrDefault(String key);
> >>>>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> >>>>>
> >>>>> Also all this must be done on your own, no fluent API for it ;(
> >>>>>
> >>>>> Most code I've seen simply don't use the ?. chain notation
> >>> because
> >>>> it only
> >>>>>> works for 'navigation' use cases. Which we barely have
> >>> (except
> >>>> for
> >>>>>> programmatic default values, but there are perfectly valid
> >>> alternative
> >>>>>> solutions as well).
> >>>>>>
> >>>>> I think its more that many programmers still did not have really
> >>> worked
> >>>>> with Java 8. For me it sounds like "the farmer only eats what he
> >>>> knows".
> >>>>> After having worked with Java 8 for some months now, I will never
> go
> >>> back,
> >>>>> if not necessary, really.
> >>>>>
> >>>>>
> >>>>>> Ad Functions:
> >>>>>> I've not yet seen a benefit in our current API. Actually the
> >>> only
> >>>> thing we
> >>>>>> use it for currently is to replace 2 Comparator instances. I
> >>> don't
> >>>> think
> >>>>>> this is something we could't do with SE7 as well ;)
> >>>>>>
> >>>>> There are several cases where it has benefits, eg the additional
> >>> property
> >>>>> function in Filter. Without Java 8 you have to create an additional
> >>>>> interface for it. MOst advantages beside the new abstraction
> >>> possibilities
> >>>>> are in the implementation. Several things are so much easier with
> Java
> >>> 8...
> >>>>>
> >>>>> Ad default methods in interfaces:
> >>>>>> Actually I'm not a huge fan of all those convenience functions
> >>> in
> >>>> our
> >>>>>> Configuration interface anyway. It just makes it harder to read.
> >>>>>>
> >>>>> SE is different than EE. You don't have CDI that helps a lot.
> >>>> That's a
> >>>>> fact as it is. I as well wish there will be more. Perhaps we get
> with
> >>>>> Jigsaw some additional features, but I will not ask for going for
> Java
> >>> 9 as
> >>>>> a base for the API ;)
> >>>>> Harder to read is to some part also a matter of taste. When these
> >>> things
> >>>>> feel cumbersome, my personal reaction is, you should work more with
> >>> Java 8
> >>>>> and you will love that you have to write less abstract classes, you
> >>> dont
> >>>>> have to expose additional singletons for accessing things and you
> can
> >>>>> greatly help SPI implementors out of the API instead of providing
> >>> abstract
> >>>>> classes and create deps on your implementation...
> >>>>>
> >>>>>
> >>>>>
> >>>>>> What about adding either a branch or a module for java7?
> >>>>>>
> >>>>> Could be an option, as I always said.
> >>>>>
> >>>>>
> >>>>>
> >>>>> That way we could continue trying implement our core functionality
> >>> with
> >>>>>> both. And at the end of the day we do a resume and weight up the
> >>> pros
> >>>> and
> >>>>>> cons again.
> >>>>>>
> >>>>> No, go for 8 and provide 7 in parallel by the colleagues that wants
> >>> it.
> >>>>> Since you state it is so important for the next decade there will
> be
> >>> people
> >>>>> that do the work, I assume. And don't complain if it is more work
> >>> than
> >>>>> expected, because you have to write much more code because you are
> now
> >>> in
> >>>> 7.
> >>>>> But again, stop doing things for an outdated Java version, when you
> >>> are
> >>>>> building an API for a future JSR from scratch. It is simply useless
> >>> IMO.
> >>>>>
> >>>>>
> >>>>>
> >>>>>>
> >>>>>> LieGrue,
> >>>>>> strub
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> > On Friday, 2 January 2015, 14:02, Werner Keil
> >>>> <we...@gmail.com>
> >>>>>> wrote:
> >>>>>> > > Romain,
> >>>>>> >
> >>>>>> > That's a good point. I flagged this with e.g. JavaMoney.
> >>> Given
> >>>> it aims
> >>>>>> more
> >>>>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
> >>> are
> >>>> already
> >>>>>> > available for Java 7 or even 6 and before, that seemed of
> >>> less
> >>>> concern to
> >>>>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
> >>> or 9,
> >>>> so a
> >>>>>> > theoretical ME usage of the API could work in a future
> >>> version of
> >>>> Java
> >>>>>> > (ME), too.
> >>>>>> >
> >>>>>> > Here it's more about backward-compatibility, and looking
> >>> at
> >>>> other Apache
> >>>>>> > projects like DeviceMap, etc. a majority requires at most
> >>> Java 6
> >>>> as
> >>>>>> minimum
> >>>>>> > version today. Some may have shifted to 7, but I couldn't
> >>>
> >>>> think of an
> >>>>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
> >>> that, so
> >>>> some
> >>>>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
> >>>> require
> >>>>>> Java
> >>>>>> > SE 8, but a prior version of the same projects or modules
> >>> will
> >>>> still work
> >>>>>> > with CDI 1.x and Java 7.
> >>>>>> >
> >>>>>> > There are a few "functional" aspects, but if you
> >>> need to
> >>>> declare a
> >>>>>> > "Functional Interface" that works in Java 7 and 8
> >>> all
> >>>> you have to do
> >>>>>> > is
> >>>>>> > forget about the SE 8 annotation. It'll still work in 8
> >>> if
> >>>> declared
> >>>>>> right.
> >>>>>> > So we might have to declare some of the interfaces without
> >>> the
> >>>>>> > @FunctionalInterface annotation (or comment it out for now)
> >>> and
> >>>> refrain
> >>>>>> > from reusing those Java SE 8 provides. Stubbing them out with
> >>>
> >>>> either
> >>>>>> config
> >>>>>> > specific or the same method names would be a solution.
> >>>>>> >
> >>>>>> > Optional was discussed in a hangout last night, and I
> >>> wasn't
> >>>> under the
> >>>>>> > impression we would have to use it in places where a simple
> >>>> "null
> >>>>>> > check"
> >>>>>> > also works, so that doesn't look like a Java SE 8 feature
> >>> to
> >>>> be seen as
> >>>>>> > mandadory or inevitable either.
> >>>>>> >
> >>>>>> > If the API was mostly portable, then some implementations or
> >>>
> >>>> modules
> >>>>>> could
> >>>>>> > be SE 8 Specific. I heard, that is somehow like Spring does
> >>> it,
> >>>> too;-)
> >>>>>> >
> >>>>>> >
> >>>>>> > Werner
> >>>>>> >
> >>>>>> >
> >>>>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> >>>>>> > <rm...@gmail.com>
> >>>>>> > wrote:
> >>>>>> >
> >>>>>> >> Hi guys,
> >>>>>> >>
> >>>>>> >> I know we said java 8 is good to start a project but
> >>> this is
> >>>> a blocker
> >>>>>> >> to make of tamaya built in config solution in project
> >>> bound
> >>>> to java 7
> >>>>>> >> like JavaEE 7 containers for instance.
> >>>>>> >>
> >>>>>> >> Since Java 8 doesn't bring anything on implemtation
> >>> point
> >>>> of view we
> >>>>>> >> mandate/cant replace by java 7 can we rethink about it?
> >>>>>> >>
> >>>>>> >>
> >>>>>> >> Romain Manni-Bucau
> >>>>>> >> @rmannibucau
> >>>>>> >> http://www.tomitribe.com
> >>>>>> >> http://rmannibucau.wordpress.com
> >>>>>> >> https://github.com/rmannibucau
> >>>>>> >>
> >>>>>> >
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> *Anatole Tresch*
> >>>>> Java Engineer & Architect, JSR Spec Lead
> >>>>> Glärnischweg 10
> >>>>> CH - 8620 Wetzikon
> >>>>>
> >>>>> *Switzerland, Europe Zurich, GMT+1*
> >>>>> *Twitter: @atsticks*
> >>>>> *Blogs: **http://javaremarkables.blogspot.ch/
> >>>>> <http://javaremarkables.blogspot.ch/>*
> >>>>>
> >>>>> *Google: atsticksMobile +41-76 344 62 79*
> >>>>
> >>>
> >>
> >
> >
> >
> >--
> >
> >Otávio Gonçalves de Santana
> >
> >
> >blog: http://otaviosantana.blogspot.com.br/
> >twitter: http://twitter.com/otaviojava
> >site: http://about.me/otaviojava
> >55 (11) 98255-3513
> >
> >
> >
> >
>
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
> IMHO, the project is born and create a project without lost
> some cool improvements such Lambda, stream, optional, etc.
The only thing we really used was Optional. This was really easy to get going as default method in 8 as well. Look at the code, I really didn't change much.
> The Java 7 will dead on April.
Hah, good joke. Oracle will not manage to hold their EOL. I expect it to be somewhen 2016 or 2017.
Java8 is just not stable enough for production yet.
LieGrue,
strub
On Wednesday, 7 January 2015, 0:05, Otávio Gonçalves de Santana <ot...@gmail.com> wrote:
>
>
>Great!, but manager two projects with the same functions may stay difficult with the time.
>IMHO, the project is born and create a project without lost some cool improvements such Lambda, stream, optional, etc. The Java 7 will dead on April. The new projects such CDI 2.0, JSON-B, and another sub-components in Java EE 8, are using the Java 8 as minimum requirement.
>
>
>On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de> wrote:
>
>I tried to do some small tricks and it was actually really easy to implement a java7 version and base our java8 version in backward compatible ways on it.
>>
>>I've pushed this to a fb-se7 branch on github.
>>
>>https://github.com/struberg/incubator-tamaya/tree/fb-se7
>>
>>
>>The idea is to basically have 2 'versions' of the spec in one go.
>>
>>The java7/api module provides an api which builds perfectly fine with Java7.
>>
>>The java8/api module is 'backward compatible' to the Java7 api and adds the Optional etc features on top of it. I just had to tweak it a little bit.
>>
>>For now I just did the API, but the impl is even less of a problem. Trying to check what we could reuse for the java7 impl as well.
>>
>>
>>
>>LieGrue,
>>strub
>>
>>
>>
>>
>>
>>> On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de> wrote:
>>> > I do see the benefits of Java8 but I also do see that not many can use it in
>>> production in the next 2 years. Thus it will not get adopted. We are in a phase
>>> of transaction right now.
>>>
>>> That's the reason why I proposed to try out both of em and compare them when
>>> we are done.
>>>
>>> Let me draft this up.
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>>
>>>
>>>
>>>
>>>> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
>>> <rm...@gmail.com> wrote:
>>>> > ok so let fork tamaya to support java 7, who will backport to java 8
>>>> banch - yeah nobody will use j8 branch today?
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau
>>>> http://www.tomitribe.com
>>>> http://rmannibucau.wordpress.com
>>>> https://github.com/rmannibucau
>>>>
>>>>
>>>>
>>>> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>>>>> Hi all
>>>>>
>>>>> I still think it is a real big mistake to go for Java 7. Do it in 8
>>> and
>>>>> provide a backport for 7. Not the other way round!
>>>>> Some additional remarks inline:
>>>>>
>>>>> Cheers
>>>>> Anatole
>>>>>
>>>>>
>>>>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>>>>
>>>>>> I'm also still not convinced.
>>>>>>
>>>>>> Let's step back a few meters and simply compare the benefits
>>> vs the
>>>>>> downsides
>>>>>>
>>>>>>
>>>>>> - PRO
>>>>>> * more 'modern'
>>>>>> * Optional
>>>>>> * Functions
>>>>>> * default methods in interfaces
>>>>>>
>>>>> + Streams
>>>>> + extended functions on collections
>>>>> + date time API
>>>>> + concurrent improvements
>>>>>
>>>>>
>>>>>
>>>>>> - CON
>>>>>> * not backward compatible
>>>>>> * blocks adoption in current containers
>>>>>>
>>>>> -> no. the EE7 TCK is not running on Java 7, but the containers do!
>>> Even
>>>>> bigger companies like Credit Suisse are thinking on replacing the JDK
>>>>> during next year.
>>>>>
>>>>>
>>>>>
>>>>>> * blocks adoption in many user projects
>>>>>>
>>>>> But as well is a prop compared to other libraries existing and will
>>> for
>>>>> sure boost support by other well known JUGs such as SouJava and LJC..
>>>>>
>>>>>
>>>>>
>>>>>> * we actually don't really need any of it's features
>>>>>>
>>>>> Of course, you can build things without it. But as I said, it is as
>>> you
>>>>> would build code in Java 1.4 without generics. One year later you will
>>> have
>>>>> to overhaul your API, or somebody else will come and do it in its own
>>>>> project. And most important: a JSR based on Java 7 will never be
>>> accepted
>>>>> by the EC. So stop crying for the past, go for the future (and provide
>>> a
>>>>> backport - should be doable in 2-3 hours for a release).
>>>>>
>>>>>
>>>>>
>>>>>> Let's face it: JDK8 is still not production ready. It is
>>> somewhat
>>>> slower
>>>>>> than Java7 still and I honestly know no single big project which
>>> runs
>>>> on
>>>>>> Java8. Not even the JavaEE7 TCK passes on Java8..
>>>>>
>>>>> As I said before, I know also bigger companies that probably will go
>>> to
>>>>> Java 8 rather soon. And honestly I do not care. I wanted to build with
>>> you
>>>>> guys a modern API, not an outdated one ;)
>>>>>
>>>>>
>>>>> Ad Optional:
>>>>>>
>>>>>> The discussion we had was around Optional. The only impact it has
>>> on me
>>>>>> now is that instead of
>>>>>>
>>>>>>
>>>>>> if (blabla != null) {...}
>>>>>>
>>>>>> I've seen
>>>>>>
>>>>>> if (blabla.isPresent()) {..}
>>>>>>
>>>>>
>>>>> Please read my blog as stated in one of my first mails related to the
>>>>> topic.
>>>>>
>>>>> Instead of
>>>>>
>>>>> Optional<T> get(String)
>>>>>
>>>>> you get
>>>>>
>>>>> T get(String key);
>>>>> T getOrDefault(String key);
>>>>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>>>>>
>>>>> Also all this must be done on your own, no fluent API for it ;(
>>>>>
>>>>> Most code I've seen simply don't use the ?. chain notation
>>> because
>>>> it only
>>>>>> works for 'navigation' use cases. Which we barely have
>>> (except
>>>> for
>>>>>> programmatic default values, but there are perfectly valid
>>> alternative
>>>>>> solutions as well).
>>>>>>
>>>>> I think its more that many programmers still did not have really
>>> worked
>>>>> with Java 8. For me it sounds like "the farmer only eats what he
>>>> knows".
>>>>> After having worked with Java 8 for some months now, I will never go
>>> back,
>>>>> if not necessary, really.
>>>>>
>>>>>
>>>>>> Ad Functions:
>>>>>> I've not yet seen a benefit in our current API. Actually the
>>> only
>>>> thing we
>>>>>> use it for currently is to replace 2 Comparator instances. I
>>> don't
>>>> think
>>>>>> this is something we could't do with SE7 as well ;)
>>>>>>
>>>>> There are several cases where it has benefits, eg the additional
>>> property
>>>>> function in Filter. Without Java 8 you have to create an additional
>>>>> interface for it. MOst advantages beside the new abstraction
>>> possibilities
>>>>> are in the implementation. Several things are so much easier with Java
>>> 8...
>>>>>
>>>>> Ad default methods in interfaces:
>>>>>> Actually I'm not a huge fan of all those convenience functions
>>> in
>>>> our
>>>>>> Configuration interface anyway. It just makes it harder to read.
>>>>>>
>>>>> SE is different than EE. You don't have CDI that helps a lot.
>>>> That's a
>>>>> fact as it is. I as well wish there will be more. Perhaps we get with
>>>>> Jigsaw some additional features, but I will not ask for going for Java
>>> 9 as
>>>>> a base for the API ;)
>>>>> Harder to read is to some part also a matter of taste. When these
>>> things
>>>>> feel cumbersome, my personal reaction is, you should work more with
>>> Java 8
>>>>> and you will love that you have to write less abstract classes, you
>>> dont
>>>>> have to expose additional singletons for accessing things and you can
>>>>> greatly help SPI implementors out of the API instead of providing
>>> abstract
>>>>> classes and create deps on your implementation...
>>>>>
>>>>>
>>>>>
>>>>>> What about adding either a branch or a module for java7?
>>>>>>
>>>>> Could be an option, as I always said.
>>>>>
>>>>>
>>>>>
>>>>> That way we could continue trying implement our core functionality
>>> with
>>>>>> both. And at the end of the day we do a resume and weight up the
>>> pros
>>>> and
>>>>>> cons again.
>>>>>>
>>>>> No, go for 8 and provide 7 in parallel by the colleagues that wants
>>> it.
>>>>> Since you state it is so important for the next decade there will be
>>> people
>>>>> that do the work, I assume. And don't complain if it is more work
>>> than
>>>>> expected, because you have to write much more code because you are now
>>> in
>>>> 7.
>>>>> But again, stop doing things for an outdated Java version, when you
>>> are
>>>>> building an API for a future JSR from scratch. It is simply useless
>>> IMO.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> LieGrue,
>>>>>> strub
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> > On Friday, 2 January 2015, 14:02, Werner Keil
>>>> <we...@gmail.com>
>>>>>> wrote:
>>>>>> > > Romain,
>>>>>> >
>>>>>> > That's a good point. I flagged this with e.g. JavaMoney.
>>> Given
>>>> it aims
>>>>>> more
>>>>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
>>> are
>>>> already
>>>>>> > available for Java 7 or even 6 and before, that seemed of
>>> less
>>>> concern to
>>>>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
>>> or 9,
>>>> so a
>>>>>> > theoretical ME usage of the API could work in a future
>>> version of
>>>> Java
>>>>>> > (ME), too.
>>>>>> >
>>>>>> > Here it's more about backward-compatibility, and looking
>>> at
>>>> other Apache
>>>>>> > projects like DeviceMap, etc. a majority requires at most
>>> Java 6
>>>> as
>>>>>> minimum
>>>>>> > version today. Some may have shifted to 7, but I couldn't
>>>
>>>> think of an
>>>>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
>>> that, so
>>>> some
>>>>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
>>>> require
>>>>>> Java
>>>>>> > SE 8, but a prior version of the same projects or modules
>>> will
>>>> still work
>>>>>> > with CDI 1.x and Java 7.
>>>>>> >
>>>>>> > There are a few "functional" aspects, but if you
>>> need to
>>>> declare a
>>>>>> > "Functional Interface" that works in Java 7 and 8
>>> all
>>>> you have to do
>>>>>> > is
>>>>>> > forget about the SE 8 annotation. It'll still work in 8
>>> if
>>>> declared
>>>>>> right.
>>>>>> > So we might have to declare some of the interfaces without
>>> the
>>>>>> > @FunctionalInterface annotation (or comment it out for now)
>>> and
>>>> refrain
>>>>>> > from reusing those Java SE 8 provides. Stubbing them out with
>>>
>>>> either
>>>>>> config
>>>>>> > specific or the same method names would be a solution.
>>>>>> >
>>>>>> > Optional was discussed in a hangout last night, and I
>>> wasn't
>>>> under the
>>>>>> > impression we would have to use it in places where a simple
>>>> "null
>>>>>> > check"
>>>>>> > also works, so that doesn't look like a Java SE 8 feature
>>> to
>>>> be seen as
>>>>>> > mandadory or inevitable either.
>>>>>> >
>>>>>> > If the API was mostly portable, then some implementations or
>>>
>>>> modules
>>>>>> could
>>>>>> > be SE 8 Specific. I heard, that is somehow like Spring does
>>> it,
>>>> too;-)
>>>>>> >
>>>>>> >
>>>>>> > Werner
>>>>>> >
>>>>>> >
>>>>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>>>>>> > <rm...@gmail.com>
>>>>>> > wrote:
>>>>>> >
>>>>>> >> Hi guys,
>>>>>> >>
>>>>>> >> I know we said java 8 is good to start a project but
>>> this is
>>>> a blocker
>>>>>> >> to make of tamaya built in config solution in project
>>> bound
>>>> to java 7
>>>>>> >> like JavaEE 7 containers for instance.
>>>>>> >>
>>>>>> >> Since Java 8 doesn't bring anything on implemtation
>>> point
>>>> of view we
>>>>>> >> mandate/cant replace by java 7 can we rethink about it?
>>>>>> >>
>>>>>> >>
>>>>>> >> Romain Manni-Bucau
>>>>>> >> @rmannibucau
>>>>>> >> http://www.tomitribe.com
>>>>>> >> http://rmannibucau.wordpress.com
>>>>>> >> https://github.com/rmannibucau
>>>>>> >>
>>>>>> >
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Anatole Tresch*
>>>>> Java Engineer & Architect, JSR Spec Lead
>>>>> Glärnischweg 10
>>>>> CH - 8620 Wetzikon
>>>>>
>>>>> *Switzerland, Europe Zurich, GMT+1*
>>>>> *Twitter: @atsticks*
>>>>> *Blogs: **http://javaremarkables.blogspot.ch/
>>>>> <http://javaremarkables.blogspot.ch/>*
>>>>>
>>>>> *Google: atsticksMobile +41-76 344 62 79*
>>>>
>>>
>>
>
>
>
>--
>
>Otávio Gonçalves de Santana
>
>
>blog: http://otaviosantana.blogspot.com.br/
>twitter: http://twitter.com/otaviojava
>site: http://about.me/otaviojava
>55 (11) 98255-3513
>
>
>
>
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
good idea will start with it this evening.
LieGrue,
strub
> On Wednesday, 7 January 2015, 9:52, Romain Manni-Bucau <rm...@gmail.com> wrote:
> > Saw some changes about java7 in a dedicated module, any planned moves
> from current impl to j7 and then just add what is missing in j8
> module? Then serious things can start.
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-07 0:18 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> Jsonb impl will stay j7 for few years so i still dont get these arguments.
>> Spec min version are never respected in practise
>>
>> Le 7 janv. 2015 00:07, "Otávio Gonçalves de Santana"
>> <ot...@gmail.com> a écrit :
>>
>>> Great!, but manager two projects with the same functions may stay
>>> difficult
>>> with the time.
>>> IMHO, the project is born and create a project without lost some cool
>>> improvements such Lambda, stream, optional, etc. The Java 7 will dead
> on
>>> April. The new projects such CDI 2.0, JSON-B, and another
> sub-components
>>> in
>>> Java EE 8, are using the Java 8 as minimum requirement.
>>>
>>> On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de>
> wrote:
>>>
>>> > I tried to do some small tricks and it was actually really easy to
>>> > implement a java7 version and base our java8 version in backward
>>> > compatible
>>> > ways on it.
>>> >
>>> > I've pushed this to a fb-se7 branch on github.
>>> >
>>> > https://github.com/struberg/incubator-tamaya/tree/fb-se7
>>> >
>>> >
>>> > The idea is to basically have 2 'versions' of the spec in
> one go.
>>> >
>>> > The java7/api module provides an api which builds perfectly fine
> with
>>> > Java7.
>>> >
>>> > The java8/api module is 'backward compatible' to the Java7
> api and adds
>>> > the Optional etc features on top of it. I just had to tweak it a
> little
>>> > bit.
>>> >
>>> > For now I just did the API, but the impl is even less of a
> problem.
>>> > Trying
>>> > to check what we could reuse for the java7 impl as well.
>>> >
>>> >
>>> >
>>> > LieGrue,
>>> > strub
>>> >
>>> >
>>> >
>>> >
>>> > > On Tuesday, 6 January 2015, 15:35, Mark Struberg
> <st...@yahoo.de>
>>> > wrote:
>>> > > > I do see the benefits of Java8 but I also do see that
> not many can
>>> > > > use
>>> > it in
>>> > > production in the next 2 years. Thus it will not get adopted.
> We are
>>> > > in
>>> > a phase
>>> > > of transaction right now.
>>> > >
>>> > > That's the reason why I proposed to try out both of em
> and compare
>>> > > them
>>> > when
>>> > > we are done.
>>> > >
>>> > > Let me draft this up.
>>> > >
>>> > > LieGrue,
>>> > > strub
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
>>> > > <rm...@gmail.com> wrote:
>>> > >> > ok so let fork tamaya to support java 7, who will
> backport to java
>>> > >> 8
>>> > >> banch - yeah nobody will use j8 branch today?
>>> > >>
>>> > >>
>>> > >> Romain Manni-Bucau
>>> > >> @rmannibucau
>>> > >> http://www.tomitribe.com
>>> > >> http://rmannibucau.wordpress.com
>>> > >> https://github.com/rmannibucau
>>> > >>
>>> > >>
>>> > >>
>>> > >> 2015-01-06 15:18 GMT+01:00 Anatole Tresch
> <at...@gmail.com>:
>>> > >>> Hi all
>>> > >>>
>>> > >>> I still think it is a real big mistake to go for
> Java 7. Do it in
>>> > >>> 8
>>> > > and
>>> > >>> provide a backport for 7. Not the other way round!
>>> > >>> Some additional remarks inline:
>>> > >>>
>>> > >>> Cheers
>>> > >>> Anatole
>>> > >>>
>>> > >>>
>>> > >>> 2015-01-06 14:26 GMT+01:00 Mark Struberg
> <st...@yahoo.de>:
>>> > >>>
>>> > >>>> I'm also still not convinced.
>>> > >>>>
>>> > >>>> Let's step back a few meters and simply
> compare the benefits
>>> > > vs the
>>> > >>>> downsides
>>> > >>>>
>>> > >>>>
>>> > >>>> - PRO
>>> > >>>> * more 'modern'
>>> > >>>> * Optional
>>> > >>>> * Functions
>>> > >>>> * default methods in interfaces
>>> > >>>>
>>> > >>> + Streams
>>> > >>> + extended functions on collections
>>> > >>> + date time API
>>> > >>> + concurrent improvements
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>> - CON
>>> > >>>> * not backward compatible
>>> > >>>> * blocks adoption in current containers
>>> > >>>>
>>> > >>> -> no. the EE7 TCK is not running on Java 7, but
> the containers
>>> > >>> do!
>>> > > Even
>>> > >>> bigger companies like Credit Suisse are thinking on
> replacing the
>>> > >>> JDK
>>> > >>> during next year.
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>> * blocks adoption in many user projects
>>> > >>>>
>>> > >>> But as well is a prop compared to other libraries
> existing and
>>> > >>> will
>>> > > for
>>> > >>> sure boost support by other well known JUGs such as
> SouJava and
>>> > >>> LJC..
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>> * we actually don't really need any of
> it's features
>>> > >>>>
>>> > >>> Of course, you can build things without it. But as
> I said, it is
>>> > >>> as
>>> > > you
>>> > >>> would build code in Java 1.4 without generics. One
> year later you
>>> > will
>>> > > have
>>> > >>> to overhaul your API, or somebody else will come
> and do it in its
>>> > >>> own
>>> > >>> project. And most important: a JSR based on Java 7
> will never be
>>> > > accepted
>>> > >>> by the EC. So stop crying for the past, go for the
> future (and
>>> > provide
>>> > > a
>>> > >>> backport - should be doable in 2-3 hours for a
> release).
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>> Let's face it: JDK8 is still not production
> ready. It is
>>> > > somewhat
>>> > >> slower
>>> > >>>> than Java7 still and I honestly know no single
> big project which
>>> > > runs
>>> > >> on
>>> > >>>> Java8. Not even the JavaEE7 TCK passes on
> Java8..
>>> > >>>
>>> > >>> As I said before, I know also bigger companies that
> probably will
>>> > >>> go
>>> > > to
>>> > >>> Java 8 rather soon. And honestly I do not care. I
> wanted to build
>>> > with
>>> > > you
>>> > >>> guys a modern API, not an outdated one ;)
>>> > >>>
>>> > >>>
>>> > >>> Ad Optional:
>>> > >>>>
>>> > >>>> The discussion we had was around Optional. The
> only impact it has
>>> > > on me
>>> > >>>> now is that instead of
>>> > >>>>
>>> > >>>>
>>> > >>>> if (blabla != null) {...}
>>> > >>>>
>>> > >>>> I've seen
>>> > >>>>
>>> > >>>> if (blabla.isPresent()) {..}
>>> > >>>>
>>> > >>>
>>> > >>> Please read my blog as stated in one of my first
> mails related to
>>> > >>> the
>>> > >>> topic.
>>> > >>>
>>> > >>> Instead of
>>> > >>>
>>> > >>> Optional<T> get(String)
>>> > >>>
>>> > >>> you get
>>> > >>>
>>> > >>> T get(String key);
>>> > >>> T getOrDefault(String key);
>>> > >>> T getOrThrow(String key, ExceptionFactory<T>)
> throws T;
>>> > >>>
>>> > >>> Also all this must be done on your own, no fluent
> API for it ;(
>>> > >>>
>>> > >>> Most code I've seen simply don't use the ?.
> chain notation
>>> > > because
>>> > >> it only
>>> > >>>> works for 'navigation' use cases. Which
> we barely have
>>> > > (except
>>> > >> for
>>> > >>>> programmatic default values, but there are
> perfectly valid
>>> > > alternative
>>> > >>>> solutions as well).
>>> > >>>>
>>> > >>> I think its more that many programmers still did
> not have really
>>> > > worked
>>> > >>> with Java 8. For me it sounds like "the farmer
> only eats what he
>>> > >> knows".
>>> > >>> After having worked with Java 8 for some months
> now, I will never
>>> > >>> go
>>> > > back,
>>> > >>> if not necessary, really.
>>> > >>>
>>> > >>>
>>> > >>>> Ad Functions:
>>> > >>>> I've not yet seen a benefit in our current
> API. Actually the
>>> > > only
>>> > >> thing we
>>> > >>>> use it for currently is to replace 2 Comparator
> instances. I
>>> > > don't
>>> > >> think
>>> > >>>> this is something we could't do with SE7 as
> well ;)
>>> > >>>>
>>> > >>> There are several cases where it has benefits, eg
> the additional
>>> > > property
>>> > >>> function in Filter. Without Java 8 you have to
> create an
>>> > >>> additional
>>> > >>> interface for it. MOst advantages beside the new
> abstraction
>>> > > possibilities
>>> > >>> are in the implementation. Several things are so
> much easier with
>>> > Java
>>> > > 8...
>>> > >>>
>>> > >>> Ad default methods in interfaces:
>>> > >>>> Actually I'm not a huge fan of all those
> convenience functions
>>> > > in
>>> > >> our
>>> > >>>> Configuration interface anyway. It just makes
> it harder to read.
>>> > >>>>
>>> > >>> SE is different than EE. You don't have CDI
> that helps a lot.
>>> > >> That's a
>>> > >>> fact as it is. I as well wish there will be more.
> Perhaps we get
>>> > >>> with
>>> > >>> Jigsaw some additional features, but I will not ask
> for going for
>>> > Java
>>> > > 9 as
>>> > >>> a base for the API ;)
>>> > >>> Harder to read is to some part also a matter of
> taste. When these
>>> > > things
>>> > >>> feel cumbersome, my personal reaction is, you
> should work more
>>> > >>> with
>>> > > Java 8
>>> > >>> and you will love that you have to write less
> abstract classes,
>>> > >>> you
>>> > > dont
>>> > >>> have to expose additional singletons for accessing
> things and you
>>> > >>> can
>>> > >>> greatly help SPI implementors out of the API
> instead of providing
>>> > > abstract
>>> > >>> classes and create deps on your implementation...
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>> What about adding either a branch or a module
> for java7?
>>> > >>>>
>>> > >>> Could be an option, as I always said.
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>> That way we could continue trying implement our
> core functionality
>>> > > with
>>> > >>>> both. And at the end of the day we do a resume
> and weight up the
>>> > > pros
>>> > >> and
>>> > >>>> cons again.
>>> > >>>>
>>> > >>> No, go for 8 and provide 7 in parallel by the
> colleagues that
>>> > >>> wants
>>> > > it.
>>> > >>> Since you state it is so important for the next
> decade there will
>>> > >>> be
>>> > > people
>>> > >>> that do the work, I assume. And don't complain
> if it is more work
>>> > > than
>>> > >>> expected, because you have to write much more code
> because you are
>>> > now
>>> > > in
>>> > >> 7.
>>> > >>> But again, stop doing things for an outdated Java
> version, when
>>> > >>> you
>>> > > are
>>> > >>> building an API for a future JSR from scratch. It
> is simply
>>> > >>> useless
>>> > > IMO.
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>>
>>> > >>>> LieGrue,
>>> > >>>> strub
>>> > >>>>
>>> > >>>>
>>> > >>>>
>>> > >>>>
>>> > >>>> > On Friday, 2 January 2015, 14:02, Werner
> Keil
>>> > >> <we...@gmail.com>
>>> > >>>> wrote:
>>> > >>>> > > Romain,
>>> > >>>> >
>>> > >>>> > That's a good point. I flagged this
> with e.g. JavaMoney.
>>> > > Given
>>> > >> it aims
>>> > >>>> more
>>> > >>>> > at future platforms and e.g.
> java.util.Currency (or ICU4J)
>>> > > are
>>> > >> already
>>> > >>>> > available for Java 7 or even 6 and before,
> that seemed of
>>> > > less
>>> > >> concern to
>>> > >>>> > the EG or Anatole. Oracle stated, Lambdas
> may come to ME 8.x
>>> > > or 9,
>>> > >> so a
>>> > >>>> > theoretical ME usage of the API could work
> in a future
>>> > > version of
>>> > >> Java
>>> > >>>> > (ME), too.
>>> > >>>> >
>>> > >>>> > Here it's more about
> backward-compatibility, and looking
>>> > > at
>>> > >> other Apache
>>> > >>>> > projects like DeviceMap, etc. a majority
> requires at most
>>> > > Java 6
>>> > >> as
>>> > >>>> minimum
>>> > >>>> > version today. Some may have shifted to 7,
> but I couldn't
>>> > >
>>> > >> think of an
>>> > >>>> > Apache project that was Java 8 minimum.
> CDI 2 plans to do
>>> > > that, so
>>> > >> some
>>> > >>>> > modules in DeltaSpike could eventually
> graduate to CDI 2 and
>>> > >> require
>>> > >>>> Java
>>> > >>>> > SE 8, but a prior version of the same
> projects or modules
>>> > > will
>>> > >> still work
>>> > >>>> > with CDI 1.x and Java 7.
>>> > >>>> >
>>> > >>>> > There are a few "functional"
> aspects, but if you
>>> > > need to
>>> > >> declare a
>>> > >>>> > "Functional Interface" that
> works in Java 7 and 8
>>> > > all
>>> > >> you have to do
>>> > >>>> > is
>>> > >>>> > forget about the SE 8 annotation.
> It'll still work in 8
>>> > > if
>>> > >> declared
>>> > >>>> right.
>>> > >>>> > So we might have to declare some of the
> interfaces without
>>> > > the
>>> > >>>> > @FunctionalInterface annotation (or
> comment it out for now)
>>> > > and
>>> > >> refrain
>>> > >>>> > from reusing those Java SE 8 provides.
> Stubbing them out with
>>> > >
>>> > >> either
>>> > >>>> config
>>> > >>>> > specific or the same method names would be
> a solution.
>>> > >>>> >
>>> > >>>> > Optional was discussed in a hangout last
> night, and I
>>> > > wasn't
>>> > >> under the
>>> > >>>> > impression we would have to use it in
> places where a simple
>>> > >> "null
>>> > >>>> > check"
>>> > >>>> > also works, so that doesn't look like
> a Java SE 8 feature
>>> > > to
>>> > >> be seen as
>>> > >>>> > mandadory or inevitable either.
>>> > >>>> >
>>> > >>>> > If the API was mostly portable, then some
> implementations or
>>> > >
>>> > >> modules
>>> > >>>> could
>>> > >>>> > be SE 8 Specific. I heard, that is somehow
> like Spring does
>>> > > it,
>>> > >> too;-)
>>> > >>>> >
>>> > >>>> >
>>> > >>>> > Werner
>>> > >>>> >
>>> > >>>> >
>>> > >>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain
> Manni-Bucau
>>> > >>>> > <rm...@gmail.com>
>>> > >>>> > wrote:
>>> > >>>> >
>>> > >>>> >> Hi guys,
>>> > >>>> >>
>>> > >>>> >> I know we said java 8 is good to
> start a project but
>>> > > this is
>>> > >> a blocker
>>> > >>>> >> to make of tamaya built in config
> solution in project
>>> > > bound
>>> > >> to java 7
>>> > >>>> >> like JavaEE 7 containers for
> instance.
>>> > >>>> >>
>>> > >>>> >> Since Java 8 doesn't bring
> anything on implemtation
>>> > > point
>>> > >> of view we
>>> > >>>> >> mandate/cant replace by java 7 can we
> rethink about it?
>>> > >>>> >>
>>> > >>>> >>
>>> > >>>> >> Romain Manni-Bucau
>>> > >>>> >> @rmannibucau
>>> > >>>> >> http://www.tomitribe.com
>>> > >>>> >> http://rmannibucau.wordpress.com
>>> > >>>> >> https://github.com/rmannibucau
>>> > >>>> >>
>>> > >>>> >
>>> > >>>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>> --
>>> > >>> *Anatole Tresch*
>>> > >>> Java Engineer & Architect, JSR Spec Lead
>>> > >>> Glärnischweg 10
>>> > >>> CH - 8620 Wetzikon
>>> > >>>
>>> > >>> *Switzerland, Europe Zurich, GMT+1*
>>> > >>> *Twitter: @atsticks*
>>> > >>> *Blogs: **http://javaremarkables.blogspot.ch/
>>> > >>> <http://javaremarkables.blogspot.ch/>*
>>> > >>>
>>> > >>> *Google: atsticksMobile +41-76 344 62 79*
>>> > >>
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> Otávio Gonçalves de Santana
>>>
>>> blog: http://otaviosantana.blogspot.com.br/
>>> twitter: http://twitter.com/otaviojava
>>> site: *http://about.me/otaviojava
> <http://about.me/otaviojava>*
>>> 55 (11) 98255-3513
>
Re: java 8: really?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Saw some changes about java7 in a dedicated module, any planned moves
from current impl to j7 and then just add what is missing in j8
module? Then serious things can start.
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-07 0:18 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> Jsonb impl will stay j7 for few years so i still dont get these arguments.
> Spec min version are never respected in practise
>
> Le 7 janv. 2015 00:07, "Otávio Gonçalves de Santana"
> <ot...@gmail.com> a écrit :
>
>> Great!, but manager two projects with the same functions may stay
>> difficult
>> with the time.
>> IMHO, the project is born and create a project without lost some cool
>> improvements such Lambda, stream, optional, etc. The Java 7 will dead on
>> April. The new projects such CDI 2.0, JSON-B, and another sub-components
>> in
>> Java EE 8, are using the Java 8 as minimum requirement.
>>
>> On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de> wrote:
>>
>> > I tried to do some small tricks and it was actually really easy to
>> > implement a java7 version and base our java8 version in backward
>> > compatible
>> > ways on it.
>> >
>> > I've pushed this to a fb-se7 branch on github.
>> >
>> > https://github.com/struberg/incubator-tamaya/tree/fb-se7
>> >
>> >
>> > The idea is to basically have 2 'versions' of the spec in one go.
>> >
>> > The java7/api module provides an api which builds perfectly fine with
>> > Java7.
>> >
>> > The java8/api module is 'backward compatible' to the Java7 api and adds
>> > the Optional etc features on top of it. I just had to tweak it a little
>> > bit.
>> >
>> > For now I just did the API, but the impl is even less of a problem.
>> > Trying
>> > to check what we could reuse for the java7 impl as well.
>> >
>> >
>> >
>> > LieGrue,
>> > strub
>> >
>> >
>> >
>> >
>> > > On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de>
>> > wrote:
>> > > > I do see the benefits of Java8 but I also do see that not many can
>> > > > use
>> > it in
>> > > production in the next 2 years. Thus it will not get adopted. We are
>> > > in
>> > a phase
>> > > of transaction right now.
>> > >
>> > > That's the reason why I proposed to try out both of em and compare
>> > > them
>> > when
>> > > we are done.
>> > >
>> > > Let me draft this up.
>> > >
>> > > LieGrue,
>> > > strub
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
>> > > <rm...@gmail.com> wrote:
>> > >> > ok so let fork tamaya to support java 7, who will backport to java
>> > >> 8
>> > >> banch - yeah nobody will use j8 branch today?
>> > >>
>> > >>
>> > >> Romain Manni-Bucau
>> > >> @rmannibucau
>> > >> http://www.tomitribe.com
>> > >> http://rmannibucau.wordpress.com
>> > >> https://github.com/rmannibucau
>> > >>
>> > >>
>> > >>
>> > >> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> > >>> Hi all
>> > >>>
>> > >>> I still think it is a real big mistake to go for Java 7. Do it in
>> > >>> 8
>> > > and
>> > >>> provide a backport for 7. Not the other way round!
>> > >>> Some additional remarks inline:
>> > >>>
>> > >>> Cheers
>> > >>> Anatole
>> > >>>
>> > >>>
>> > >>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>> > >>>
>> > >>>> I'm also still not convinced.
>> > >>>>
>> > >>>> Let's step back a few meters and simply compare the benefits
>> > > vs the
>> > >>>> downsides
>> > >>>>
>> > >>>>
>> > >>>> - PRO
>> > >>>> * more 'modern'
>> > >>>> * Optional
>> > >>>> * Functions
>> > >>>> * default methods in interfaces
>> > >>>>
>> > >>> + Streams
>> > >>> + extended functions on collections
>> > >>> + date time API
>> > >>> + concurrent improvements
>> > >>>
>> > >>>
>> > >>>
>> > >>>> - CON
>> > >>>> * not backward compatible
>> > >>>> * blocks adoption in current containers
>> > >>>>
>> > >>> -> no. the EE7 TCK is not running on Java 7, but the containers
>> > >>> do!
>> > > Even
>> > >>> bigger companies like Credit Suisse are thinking on replacing the
>> > >>> JDK
>> > >>> during next year.
>> > >>>
>> > >>>
>> > >>>
>> > >>>> * blocks adoption in many user projects
>> > >>>>
>> > >>> But as well is a prop compared to other libraries existing and
>> > >>> will
>> > > for
>> > >>> sure boost support by other well known JUGs such as SouJava and
>> > >>> LJC..
>> > >>>
>> > >>>
>> > >>>
>> > >>>> * we actually don't really need any of it's features
>> > >>>>
>> > >>> Of course, you can build things without it. But as I said, it is
>> > >>> as
>> > > you
>> > >>> would build code in Java 1.4 without generics. One year later you
>> > will
>> > > have
>> > >>> to overhaul your API, or somebody else will come and do it in its
>> > >>> own
>> > >>> project. And most important: a JSR based on Java 7 will never be
>> > > accepted
>> > >>> by the EC. So stop crying for the past, go for the future (and
>> > provide
>> > > a
>> > >>> backport - should be doable in 2-3 hours for a release).
>> > >>>
>> > >>>
>> > >>>
>> > >>>> Let's face it: JDK8 is still not production ready. It is
>> > > somewhat
>> > >> slower
>> > >>>> than Java7 still and I honestly know no single big project which
>> > > runs
>> > >> on
>> > >>>> Java8. Not even the JavaEE7 TCK passes on Java8..
>> > >>>
>> > >>> As I said before, I know also bigger companies that probably will
>> > >>> go
>> > > to
>> > >>> Java 8 rather soon. And honestly I do not care. I wanted to build
>> > with
>> > > you
>> > >>> guys a modern API, not an outdated one ;)
>> > >>>
>> > >>>
>> > >>> Ad Optional:
>> > >>>>
>> > >>>> The discussion we had was around Optional. The only impact it has
>> > > on me
>> > >>>> now is that instead of
>> > >>>>
>> > >>>>
>> > >>>> if (blabla != null) {...}
>> > >>>>
>> > >>>> I've seen
>> > >>>>
>> > >>>> if (blabla.isPresent()) {..}
>> > >>>>
>> > >>>
>> > >>> Please read my blog as stated in one of my first mails related to
>> > >>> the
>> > >>> topic.
>> > >>>
>> > >>> Instead of
>> > >>>
>> > >>> Optional<T> get(String)
>> > >>>
>> > >>> you get
>> > >>>
>> > >>> T get(String key);
>> > >>> T getOrDefault(String key);
>> > >>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>> > >>>
>> > >>> Also all this must be done on your own, no fluent API for it ;(
>> > >>>
>> > >>> Most code I've seen simply don't use the ?. chain notation
>> > > because
>> > >> it only
>> > >>>> works for 'navigation' use cases. Which we barely have
>> > > (except
>> > >> for
>> > >>>> programmatic default values, but there are perfectly valid
>> > > alternative
>> > >>>> solutions as well).
>> > >>>>
>> > >>> I think its more that many programmers still did not have really
>> > > worked
>> > >>> with Java 8. For me it sounds like "the farmer only eats what he
>> > >> knows".
>> > >>> After having worked with Java 8 for some months now, I will never
>> > >>> go
>> > > back,
>> > >>> if not necessary, really.
>> > >>>
>> > >>>
>> > >>>> Ad Functions:
>> > >>>> I've not yet seen a benefit in our current API. Actually the
>> > > only
>> > >> thing we
>> > >>>> use it for currently is to replace 2 Comparator instances. I
>> > > don't
>> > >> think
>> > >>>> this is something we could't do with SE7 as well ;)
>> > >>>>
>> > >>> There are several cases where it has benefits, eg the additional
>> > > property
>> > >>> function in Filter. Without Java 8 you have to create an
>> > >>> additional
>> > >>> interface for it. MOst advantages beside the new abstraction
>> > > possibilities
>> > >>> are in the implementation. Several things are so much easier with
>> > Java
>> > > 8...
>> > >>>
>> > >>> Ad default methods in interfaces:
>> > >>>> Actually I'm not a huge fan of all those convenience functions
>> > > in
>> > >> our
>> > >>>> Configuration interface anyway. It just makes it harder to read.
>> > >>>>
>> > >>> SE is different than EE. You don't have CDI that helps a lot.
>> > >> That's a
>> > >>> fact as it is. I as well wish there will be more. Perhaps we get
>> > >>> with
>> > >>> Jigsaw some additional features, but I will not ask for going for
>> > Java
>> > > 9 as
>> > >>> a base for the API ;)
>> > >>> Harder to read is to some part also a matter of taste. When these
>> > > things
>> > >>> feel cumbersome, my personal reaction is, you should work more
>> > >>> with
>> > > Java 8
>> > >>> and you will love that you have to write less abstract classes,
>> > >>> you
>> > > dont
>> > >>> have to expose additional singletons for accessing things and you
>> > >>> can
>> > >>> greatly help SPI implementors out of the API instead of providing
>> > > abstract
>> > >>> classes and create deps on your implementation...
>> > >>>
>> > >>>
>> > >>>
>> > >>>> What about adding either a branch or a module for java7?
>> > >>>>
>> > >>> Could be an option, as I always said.
>> > >>>
>> > >>>
>> > >>>
>> > >>> That way we could continue trying implement our core functionality
>> > > with
>> > >>>> both. And at the end of the day we do a resume and weight up the
>> > > pros
>> > >> and
>> > >>>> cons again.
>> > >>>>
>> > >>> No, go for 8 and provide 7 in parallel by the colleagues that
>> > >>> wants
>> > > it.
>> > >>> Since you state it is so important for the next decade there will
>> > >>> be
>> > > people
>> > >>> that do the work, I assume. And don't complain if it is more work
>> > > than
>> > >>> expected, because you have to write much more code because you are
>> > now
>> > > in
>> > >> 7.
>> > >>> But again, stop doing things for an outdated Java version, when
>> > >>> you
>> > > are
>> > >>> building an API for a future JSR from scratch. It is simply
>> > >>> useless
>> > > IMO.
>> > >>>
>> > >>>
>> > >>>
>> > >>>>
>> > >>>> LieGrue,
>> > >>>> strub
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>> > On Friday, 2 January 2015, 14:02, Werner Keil
>> > >> <we...@gmail.com>
>> > >>>> wrote:
>> > >>>> > > Romain,
>> > >>>> >
>> > >>>> > That's a good point. I flagged this with e.g. JavaMoney.
>> > > Given
>> > >> it aims
>> > >>>> more
>> > >>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
>> > > are
>> > >> already
>> > >>>> > available for Java 7 or even 6 and before, that seemed of
>> > > less
>> > >> concern to
>> > >>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
>> > > or 9,
>> > >> so a
>> > >>>> > theoretical ME usage of the API could work in a future
>> > > version of
>> > >> Java
>> > >>>> > (ME), too.
>> > >>>> >
>> > >>>> > Here it's more about backward-compatibility, and looking
>> > > at
>> > >> other Apache
>> > >>>> > projects like DeviceMap, etc. a majority requires at most
>> > > Java 6
>> > >> as
>> > >>>> minimum
>> > >>>> > version today. Some may have shifted to 7, but I couldn't
>> > >
>> > >> think of an
>> > >>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
>> > > that, so
>> > >> some
>> > >>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
>> > >> require
>> > >>>> Java
>> > >>>> > SE 8, but a prior version of the same projects or modules
>> > > will
>> > >> still work
>> > >>>> > with CDI 1.x and Java 7.
>> > >>>> >
>> > >>>> > There are a few "functional" aspects, but if you
>> > > need to
>> > >> declare a
>> > >>>> > "Functional Interface" that works in Java 7 and 8
>> > > all
>> > >> you have to do
>> > >>>> > is
>> > >>>> > forget about the SE 8 annotation. It'll still work in 8
>> > > if
>> > >> declared
>> > >>>> right.
>> > >>>> > So we might have to declare some of the interfaces without
>> > > the
>> > >>>> > @FunctionalInterface annotation (or comment it out for now)
>> > > and
>> > >> refrain
>> > >>>> > from reusing those Java SE 8 provides. Stubbing them out with
>> > >
>> > >> either
>> > >>>> config
>> > >>>> > specific or the same method names would be a solution.
>> > >>>> >
>> > >>>> > Optional was discussed in a hangout last night, and I
>> > > wasn't
>> > >> under the
>> > >>>> > impression we would have to use it in places where a simple
>> > >> "null
>> > >>>> > check"
>> > >>>> > also works, so that doesn't look like a Java SE 8 feature
>> > > to
>> > >> be seen as
>> > >>>> > mandadory or inevitable either.
>> > >>>> >
>> > >>>> > If the API was mostly portable, then some implementations or
>> > >
>> > >> modules
>> > >>>> could
>> > >>>> > be SE 8 Specific. I heard, that is somehow like Spring does
>> > > it,
>> > >> too;-)
>> > >>>> >
>> > >>>> >
>> > >>>> > Werner
>> > >>>> >
>> > >>>> >
>> > >>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>> > >>>> > <rm...@gmail.com>
>> > >>>> > wrote:
>> > >>>> >
>> > >>>> >> Hi guys,
>> > >>>> >>
>> > >>>> >> I know we said java 8 is good to start a project but
>> > > this is
>> > >> a blocker
>> > >>>> >> to make of tamaya built in config solution in project
>> > > bound
>> > >> to java 7
>> > >>>> >> like JavaEE 7 containers for instance.
>> > >>>> >>
>> > >>>> >> Since Java 8 doesn't bring anything on implemtation
>> > > point
>> > >> of view we
>> > >>>> >> mandate/cant replace by java 7 can we rethink about it?
>> > >>>> >>
>> > >>>> >>
>> > >>>> >> Romain Manni-Bucau
>> > >>>> >> @rmannibucau
>> > >>>> >> http://www.tomitribe.com
>> > >>>> >> http://rmannibucau.wordpress.com
>> > >>>> >> https://github.com/rmannibucau
>> > >>>> >>
>> > >>>> >
>> > >>>>
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> *Anatole Tresch*
>> > >>> Java Engineer & Architect, JSR Spec Lead
>> > >>> Glärnischweg 10
>> > >>> CH - 8620 Wetzikon
>> > >>>
>> > >>> *Switzerland, Europe Zurich, GMT+1*
>> > >>> *Twitter: @atsticks*
>> > >>> *Blogs: **http://javaremarkables.blogspot.ch/
>> > >>> <http://javaremarkables.blogspot.ch/>*
>> > >>>
>> > >>> *Google: atsticksMobile +41-76 344 62 79*
>> > >>
>> > >
>> >
>>
>>
>>
>> --
>> Otávio Gonçalves de Santana
>>
>> blog: http://otaviosantana.blogspot.com.br/
>> twitter: http://twitter.com/otaviojava
>> site: *http://about.me/otaviojava <http://about.me/otaviojava>*
>> 55 (11) 98255-3513
Re: java 8: really?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Jsonb impl will stay j7 for few years so i still dont get these arguments.
Spec min version are never respected in practise
Le 7 janv. 2015 00:07, "Otávio Gonçalves de Santana" <
otaviopolianasantana@gmail.com> a écrit :
> Great!, but manager two projects with the same functions may stay difficult
> with the time.
> IMHO, the project is born and create a project without lost some cool
> improvements such Lambda, stream, optional, etc. The Java 7 will dead on
> April. The new projects such CDI 2.0, JSON-B, and another sub-components in
> Java EE 8, are using the Java 8 as minimum requirement.
>
> On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de> wrote:
>
> > I tried to do some small tricks and it was actually really easy to
> > implement a java7 version and base our java8 version in backward
> compatible
> > ways on it.
> >
> > I've pushed this to a fb-se7 branch on github.
> >
> > https://github.com/struberg/incubator-tamaya/tree/fb-se7
> >
> >
> > The idea is to basically have 2 'versions' of the spec in one go.
> >
> > The java7/api module provides an api which builds perfectly fine with
> > Java7.
> >
> > The java8/api module is 'backward compatible' to the Java7 api and adds
> > the Optional etc features on top of it. I just had to tweak it a little
> bit.
> >
> > For now I just did the API, but the impl is even less of a problem.
> Trying
> > to check what we could reuse for the java7 impl as well.
> >
> >
> >
> > LieGrue,
> > strub
> >
> >
> >
> >
> > > On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de>
> > wrote:
> > > > I do see the benefits of Java8 but I also do see that not many can
> use
> > it in
> > > production in the next 2 years. Thus it will not get adopted. We are in
> > a phase
> > > of transaction right now.
> > >
> > > That's the reason why I proposed to try out both of em and compare them
> > when
> > > we are done.
> > >
> > > Let me draft this up.
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > >
> > >
> > >
> > >
> > >> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
> > > <rm...@gmail.com> wrote:
> > >> > ok so let fork tamaya to support java 7, who will backport to java
> 8
> > >> banch - yeah nobody will use j8 branch today?
> > >>
> > >>
> > >> Romain Manni-Bucau
> > >> @rmannibucau
> > >> http://www.tomitribe.com
> > >> http://rmannibucau.wordpress.com
> > >> https://github.com/rmannibucau
> > >>
> > >>
> > >>
> > >> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > >>> Hi all
> > >>>
> > >>> I still think it is a real big mistake to go for Java 7. Do it in 8
> > > and
> > >>> provide a backport for 7. Not the other way round!
> > >>> Some additional remarks inline:
> > >>>
> > >>> Cheers
> > >>> Anatole
> > >>>
> > >>>
> > >>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> > >>>
> > >>>> I'm also still not convinced.
> > >>>>
> > >>>> Let's step back a few meters and simply compare the benefits
> > > vs the
> > >>>> downsides
> > >>>>
> > >>>>
> > >>>> - PRO
> > >>>> * more 'modern'
> > >>>> * Optional
> > >>>> * Functions
> > >>>> * default methods in interfaces
> > >>>>
> > >>> + Streams
> > >>> + extended functions on collections
> > >>> + date time API
> > >>> + concurrent improvements
> > >>>
> > >>>
> > >>>
> > >>>> - CON
> > >>>> * not backward compatible
> > >>>> * blocks adoption in current containers
> > >>>>
> > >>> -> no. the EE7 TCK is not running on Java 7, but the containers do!
> > > Even
> > >>> bigger companies like Credit Suisse are thinking on replacing the
> JDK
> > >>> during next year.
> > >>>
> > >>>
> > >>>
> > >>>> * blocks adoption in many user projects
> > >>>>
> > >>> But as well is a prop compared to other libraries existing and will
> > > for
> > >>> sure boost support by other well known JUGs such as SouJava and
> LJC..
> > >>>
> > >>>
> > >>>
> > >>>> * we actually don't really need any of it's features
> > >>>>
> > >>> Of course, you can build things without it. But as I said, it is as
> > > you
> > >>> would build code in Java 1.4 without generics. One year later you
> > will
> > > have
> > >>> to overhaul your API, or somebody else will come and do it in its
> own
> > >>> project. And most important: a JSR based on Java 7 will never be
> > > accepted
> > >>> by the EC. So stop crying for the past, go for the future (and
> > provide
> > > a
> > >>> backport - should be doable in 2-3 hours for a release).
> > >>>
> > >>>
> > >>>
> > >>>> Let's face it: JDK8 is still not production ready. It is
> > > somewhat
> > >> slower
> > >>>> than Java7 still and I honestly know no single big project which
> > > runs
> > >> on
> > >>>> Java8. Not even the JavaEE7 TCK passes on Java8..
> > >>>
> > >>> As I said before, I know also bigger companies that probably will
> go
> > > to
> > >>> Java 8 rather soon. And honestly I do not care. I wanted to build
> > with
> > > you
> > >>> guys a modern API, not an outdated one ;)
> > >>>
> > >>>
> > >>> Ad Optional:
> > >>>>
> > >>>> The discussion we had was around Optional. The only impact it has
> > > on me
> > >>>> now is that instead of
> > >>>>
> > >>>>
> > >>>> if (blabla != null) {...}
> > >>>>
> > >>>> I've seen
> > >>>>
> > >>>> if (blabla.isPresent()) {..}
> > >>>>
> > >>>
> > >>> Please read my blog as stated in one of my first mails related to
> the
> > >>> topic.
> > >>>
> > >>> Instead of
> > >>>
> > >>> Optional<T> get(String)
> > >>>
> > >>> you get
> > >>>
> > >>> T get(String key);
> > >>> T getOrDefault(String key);
> > >>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> > >>>
> > >>> Also all this must be done on your own, no fluent API for it ;(
> > >>>
> > >>> Most code I've seen simply don't use the ?. chain notation
> > > because
> > >> it only
> > >>>> works for 'navigation' use cases. Which we barely have
> > > (except
> > >> for
> > >>>> programmatic default values, but there are perfectly valid
> > > alternative
> > >>>> solutions as well).
> > >>>>
> > >>> I think its more that many programmers still did not have really
> > > worked
> > >>> with Java 8. For me it sounds like "the farmer only eats what he
> > >> knows".
> > >>> After having worked with Java 8 for some months now, I will never
> go
> > > back,
> > >>> if not necessary, really.
> > >>>
> > >>>
> > >>>> Ad Functions:
> > >>>> I've not yet seen a benefit in our current API. Actually the
> > > only
> > >> thing we
> > >>>> use it for currently is to replace 2 Comparator instances. I
> > > don't
> > >> think
> > >>>> this is something we could't do with SE7 as well ;)
> > >>>>
> > >>> There are several cases where it has benefits, eg the additional
> > > property
> > >>> function in Filter. Without Java 8 you have to create an additional
> > >>> interface for it. MOst advantages beside the new abstraction
> > > possibilities
> > >>> are in the implementation. Several things are so much easier with
> > Java
> > > 8...
> > >>>
> > >>> Ad default methods in interfaces:
> > >>>> Actually I'm not a huge fan of all those convenience functions
> > > in
> > >> our
> > >>>> Configuration interface anyway. It just makes it harder to read.
> > >>>>
> > >>> SE is different than EE. You don't have CDI that helps a lot.
> > >> That's a
> > >>> fact as it is. I as well wish there will be more. Perhaps we get
> with
> > >>> Jigsaw some additional features, but I will not ask for going for
> > Java
> > > 9 as
> > >>> a base for the API ;)
> > >>> Harder to read is to some part also a matter of taste. When these
> > > things
> > >>> feel cumbersome, my personal reaction is, you should work more with
> > > Java 8
> > >>> and you will love that you have to write less abstract classes, you
> > > dont
> > >>> have to expose additional singletons for accessing things and you
> can
> > >>> greatly help SPI implementors out of the API instead of providing
> > > abstract
> > >>> classes and create deps on your implementation...
> > >>>
> > >>>
> > >>>
> > >>>> What about adding either a branch or a module for java7?
> > >>>>
> > >>> Could be an option, as I always said.
> > >>>
> > >>>
> > >>>
> > >>> That way we could continue trying implement our core functionality
> > > with
> > >>>> both. And at the end of the day we do a resume and weight up the
> > > pros
> > >> and
> > >>>> cons again.
> > >>>>
> > >>> No, go for 8 and provide 7 in parallel by the colleagues that wants
> > > it.
> > >>> Since you state it is so important for the next decade there will
> be
> > > people
> > >>> that do the work, I assume. And don't complain if it is more work
> > > than
> > >>> expected, because you have to write much more code because you are
> > now
> > > in
> > >> 7.
> > >>> But again, stop doing things for an outdated Java version, when you
> > > are
> > >>> building an API for a future JSR from scratch. It is simply useless
> > > IMO.
> > >>>
> > >>>
> > >>>
> > >>>>
> > >>>> LieGrue,
> > >>>> strub
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> > On Friday, 2 January 2015, 14:02, Werner Keil
> > >> <we...@gmail.com>
> > >>>> wrote:
> > >>>> > > Romain,
> > >>>> >
> > >>>> > That's a good point. I flagged this with e.g. JavaMoney.
> > > Given
> > >> it aims
> > >>>> more
> > >>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
> > > are
> > >> already
> > >>>> > available for Java 7 or even 6 and before, that seemed of
> > > less
> > >> concern to
> > >>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
> > > or 9,
> > >> so a
> > >>>> > theoretical ME usage of the API could work in a future
> > > version of
> > >> Java
> > >>>> > (ME), too.
> > >>>> >
> > >>>> > Here it's more about backward-compatibility, and looking
> > > at
> > >> other Apache
> > >>>> > projects like DeviceMap, etc. a majority requires at most
> > > Java 6
> > >> as
> > >>>> minimum
> > >>>> > version today. Some may have shifted to 7, but I couldn't
> > >
> > >> think of an
> > >>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
> > > that, so
> > >> some
> > >>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
> > >> require
> > >>>> Java
> > >>>> > SE 8, but a prior version of the same projects or modules
> > > will
> > >> still work
> > >>>> > with CDI 1.x and Java 7.
> > >>>> >
> > >>>> > There are a few "functional" aspects, but if you
> > > need to
> > >> declare a
> > >>>> > "Functional Interface" that works in Java 7 and 8
> > > all
> > >> you have to do
> > >>>> > is
> > >>>> > forget about the SE 8 annotation. It'll still work in 8
> > > if
> > >> declared
> > >>>> right.
> > >>>> > So we might have to declare some of the interfaces without
> > > the
> > >>>> > @FunctionalInterface annotation (or comment it out for now)
> > > and
> > >> refrain
> > >>>> > from reusing those Java SE 8 provides. Stubbing them out with
> > >
> > >> either
> > >>>> config
> > >>>> > specific or the same method names would be a solution.
> > >>>> >
> > >>>> > Optional was discussed in a hangout last night, and I
> > > wasn't
> > >> under the
> > >>>> > impression we would have to use it in places where a simple
> > >> "null
> > >>>> > check"
> > >>>> > also works, so that doesn't look like a Java SE 8 feature
> > > to
> > >> be seen as
> > >>>> > mandadory or inevitable either.
> > >>>> >
> > >>>> > If the API was mostly portable, then some implementations or
> > >
> > >> modules
> > >>>> could
> > >>>> > be SE 8 Specific. I heard, that is somehow like Spring does
> > > it,
> > >> too;-)
> > >>>> >
> > >>>> >
> > >>>> > Werner
> > >>>> >
> > >>>> >
> > >>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > >>>> > <rm...@gmail.com>
> > >>>> > wrote:
> > >>>> >
> > >>>> >> Hi guys,
> > >>>> >>
> > >>>> >> I know we said java 8 is good to start a project but
> > > this is
> > >> a blocker
> > >>>> >> to make of tamaya built in config solution in project
> > > bound
> > >> to java 7
> > >>>> >> like JavaEE 7 containers for instance.
> > >>>> >>
> > >>>> >> Since Java 8 doesn't bring anything on implemtation
> > > point
> > >> of view we
> > >>>> >> mandate/cant replace by java 7 can we rethink about it?
> > >>>> >>
> > >>>> >>
> > >>>> >> Romain Manni-Bucau
> > >>>> >> @rmannibucau
> > >>>> >> http://www.tomitribe.com
> > >>>> >> http://rmannibucau.wordpress.com
> > >>>> >> https://github.com/rmannibucau
> > >>>> >>
> > >>>> >
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> *Anatole Tresch*
> > >>> Java Engineer & Architect, JSR Spec Lead
> > >>> Glärnischweg 10
> > >>> CH - 8620 Wetzikon
> > >>>
> > >>> *Switzerland, Europe Zurich, GMT+1*
> > >>> *Twitter: @atsticks*
> > >>> *Blogs: **http://javaremarkables.blogspot.ch/
> > >>> <http://javaremarkables.blogspot.ch/>*
> > >>>
> > >>> *Google: atsticksMobile +41-76 344 62 79*
> > >>
> > >
> >
>
>
>
> --
> Otávio Gonçalves de Santana
>
> blog: http://otaviosantana.blogspot.com.br/
> twitter: http://twitter.com/otaviojava
> site: *http://about.me/otaviojava <http://about.me/otaviojava>*
> 55 (11) 98255-3513
>
Re: java 8: really?
Posted by Otávio Gonçalves de Santana <ot...@gmail.com>.
Great!, but manager two projects with the same functions may stay difficult
with the time.
IMHO, the project is born and create a project without lost some cool
improvements such Lambda, stream, optional, etc. The Java 7 will dead on
April. The new projects such CDI 2.0, JSON-B, and another sub-components in
Java EE 8, are using the Java 8 as minimum requirement.
On Tue, Jan 6, 2015 at 8:52 PM, Mark Struberg <st...@yahoo.de> wrote:
> I tried to do some small tricks and it was actually really easy to
> implement a java7 version and base our java8 version in backward compatible
> ways on it.
>
> I've pushed this to a fb-se7 branch on github.
>
> https://github.com/struberg/incubator-tamaya/tree/fb-se7
>
>
> The idea is to basically have 2 'versions' of the spec in one go.
>
> The java7/api module provides an api which builds perfectly fine with
> Java7.
>
> The java8/api module is 'backward compatible' to the Java7 api and adds
> the Optional etc features on top of it. I just had to tweak it a little bit.
>
> For now I just did the API, but the impl is even less of a problem. Trying
> to check what we could reuse for the java7 impl as well.
>
>
>
> LieGrue,
> strub
>
>
>
>
> > On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de>
> wrote:
> > > I do see the benefits of Java8 but I also do see that not many can use
> it in
> > production in the next 2 years. Thus it will not get adopted. We are in
> a phase
> > of transaction right now.
> >
> > That's the reason why I proposed to try out both of em and compare them
> when
> > we are done.
> >
> > Let me draft this up.
> >
> > LieGrue,
> > strub
> >
> >
> >
> >
> >
> >
> >> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
> > <rm...@gmail.com> wrote:
> >> > ok so let fork tamaya to support java 7, who will backport to java 8
> >> banch - yeah nobody will use j8 branch today?
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >>> Hi all
> >>>
> >>> I still think it is a real big mistake to go for Java 7. Do it in 8
> > and
> >>> provide a backport for 7. Not the other way round!
> >>> Some additional remarks inline:
> >>>
> >>> Cheers
> >>> Anatole
> >>>
> >>>
> >>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >>>
> >>>> I'm also still not convinced.
> >>>>
> >>>> Let's step back a few meters and simply compare the benefits
> > vs the
> >>>> downsides
> >>>>
> >>>>
> >>>> - PRO
> >>>> * more 'modern'
> >>>> * Optional
> >>>> * Functions
> >>>> * default methods in interfaces
> >>>>
> >>> + Streams
> >>> + extended functions on collections
> >>> + date time API
> >>> + concurrent improvements
> >>>
> >>>
> >>>
> >>>> - CON
> >>>> * not backward compatible
> >>>> * blocks adoption in current containers
> >>>>
> >>> -> no. the EE7 TCK is not running on Java 7, but the containers do!
> > Even
> >>> bigger companies like Credit Suisse are thinking on replacing the JDK
> >>> during next year.
> >>>
> >>>
> >>>
> >>>> * blocks adoption in many user projects
> >>>>
> >>> But as well is a prop compared to other libraries existing and will
> > for
> >>> sure boost support by other well known JUGs such as SouJava and LJC..
> >>>
> >>>
> >>>
> >>>> * we actually don't really need any of it's features
> >>>>
> >>> Of course, you can build things without it. But as I said, it is as
> > you
> >>> would build code in Java 1.4 without generics. One year later you
> will
> > have
> >>> to overhaul your API, or somebody else will come and do it in its own
> >>> project. And most important: a JSR based on Java 7 will never be
> > accepted
> >>> by the EC. So stop crying for the past, go for the future (and
> provide
> > a
> >>> backport - should be doable in 2-3 hours for a release).
> >>>
> >>>
> >>>
> >>>> Let's face it: JDK8 is still not production ready. It is
> > somewhat
> >> slower
> >>>> than Java7 still and I honestly know no single big project which
> > runs
> >> on
> >>>> Java8. Not even the JavaEE7 TCK passes on Java8..
> >>>
> >>> As I said before, I know also bigger companies that probably will go
> > to
> >>> Java 8 rather soon. And honestly I do not care. I wanted to build
> with
> > you
> >>> guys a modern API, not an outdated one ;)
> >>>
> >>>
> >>> Ad Optional:
> >>>>
> >>>> The discussion we had was around Optional. The only impact it has
> > on me
> >>>> now is that instead of
> >>>>
> >>>>
> >>>> if (blabla != null) {...}
> >>>>
> >>>> I've seen
> >>>>
> >>>> if (blabla.isPresent()) {..}
> >>>>
> >>>
> >>> Please read my blog as stated in one of my first mails related to the
> >>> topic.
> >>>
> >>> Instead of
> >>>
> >>> Optional<T> get(String)
> >>>
> >>> you get
> >>>
> >>> T get(String key);
> >>> T getOrDefault(String key);
> >>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> >>>
> >>> Also all this must be done on your own, no fluent API for it ;(
> >>>
> >>> Most code I've seen simply don't use the ?. chain notation
> > because
> >> it only
> >>>> works for 'navigation' use cases. Which we barely have
> > (except
> >> for
> >>>> programmatic default values, but there are perfectly valid
> > alternative
> >>>> solutions as well).
> >>>>
> >>> I think its more that many programmers still did not have really
> > worked
> >>> with Java 8. For me it sounds like "the farmer only eats what he
> >> knows".
> >>> After having worked with Java 8 for some months now, I will never go
> > back,
> >>> if not necessary, really.
> >>>
> >>>
> >>>> Ad Functions:
> >>>> I've not yet seen a benefit in our current API. Actually the
> > only
> >> thing we
> >>>> use it for currently is to replace 2 Comparator instances. I
> > don't
> >> think
> >>>> this is something we could't do with SE7 as well ;)
> >>>>
> >>> There are several cases where it has benefits, eg the additional
> > property
> >>> function in Filter. Without Java 8 you have to create an additional
> >>> interface for it. MOst advantages beside the new abstraction
> > possibilities
> >>> are in the implementation. Several things are so much easier with
> Java
> > 8...
> >>>
> >>> Ad default methods in interfaces:
> >>>> Actually I'm not a huge fan of all those convenience functions
> > in
> >> our
> >>>> Configuration interface anyway. It just makes it harder to read.
> >>>>
> >>> SE is different than EE. You don't have CDI that helps a lot.
> >> That's a
> >>> fact as it is. I as well wish there will be more. Perhaps we get with
> >>> Jigsaw some additional features, but I will not ask for going for
> Java
> > 9 as
> >>> a base for the API ;)
> >>> Harder to read is to some part also a matter of taste. When these
> > things
> >>> feel cumbersome, my personal reaction is, you should work more with
> > Java 8
> >>> and you will love that you have to write less abstract classes, you
> > dont
> >>> have to expose additional singletons for accessing things and you can
> >>> greatly help SPI implementors out of the API instead of providing
> > abstract
> >>> classes and create deps on your implementation...
> >>>
> >>>
> >>>
> >>>> What about adding either a branch or a module for java7?
> >>>>
> >>> Could be an option, as I always said.
> >>>
> >>>
> >>>
> >>> That way we could continue trying implement our core functionality
> > with
> >>>> both. And at the end of the day we do a resume and weight up the
> > pros
> >> and
> >>>> cons again.
> >>>>
> >>> No, go for 8 and provide 7 in parallel by the colleagues that wants
> > it.
> >>> Since you state it is so important for the next decade there will be
> > people
> >>> that do the work, I assume. And don't complain if it is more work
> > than
> >>> expected, because you have to write much more code because you are
> now
> > in
> >> 7.
> >>> But again, stop doing things for an outdated Java version, when you
> > are
> >>> building an API for a future JSR from scratch. It is simply useless
> > IMO.
> >>>
> >>>
> >>>
> >>>>
> >>>> LieGrue,
> >>>> strub
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> > On Friday, 2 January 2015, 14:02, Werner Keil
> >> <we...@gmail.com>
> >>>> wrote:
> >>>> > > Romain,
> >>>> >
> >>>> > That's a good point. I flagged this with e.g. JavaMoney.
> > Given
> >> it aims
> >>>> more
> >>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
> > are
> >> already
> >>>> > available for Java 7 or even 6 and before, that seemed of
> > less
> >> concern to
> >>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
> > or 9,
> >> so a
> >>>> > theoretical ME usage of the API could work in a future
> > version of
> >> Java
> >>>> > (ME), too.
> >>>> >
> >>>> > Here it's more about backward-compatibility, and looking
> > at
> >> other Apache
> >>>> > projects like DeviceMap, etc. a majority requires at most
> > Java 6
> >> as
> >>>> minimum
> >>>> > version today. Some may have shifted to 7, but I couldn't
> >
> >> think of an
> >>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
> > that, so
> >> some
> >>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
> >> require
> >>>> Java
> >>>> > SE 8, but a prior version of the same projects or modules
> > will
> >> still work
> >>>> > with CDI 1.x and Java 7.
> >>>> >
> >>>> > There are a few "functional" aspects, but if you
> > need to
> >> declare a
> >>>> > "Functional Interface" that works in Java 7 and 8
> > all
> >> you have to do
> >>>> > is
> >>>> > forget about the SE 8 annotation. It'll still work in 8
> > if
> >> declared
> >>>> right.
> >>>> > So we might have to declare some of the interfaces without
> > the
> >>>> > @FunctionalInterface annotation (or comment it out for now)
> > and
> >> refrain
> >>>> > from reusing those Java SE 8 provides. Stubbing them out with
> >
> >> either
> >>>> config
> >>>> > specific or the same method names would be a solution.
> >>>> >
> >>>> > Optional was discussed in a hangout last night, and I
> > wasn't
> >> under the
> >>>> > impression we would have to use it in places where a simple
> >> "null
> >>>> > check"
> >>>> > also works, so that doesn't look like a Java SE 8 feature
> > to
> >> be seen as
> >>>> > mandadory or inevitable either.
> >>>> >
> >>>> > If the API was mostly portable, then some implementations or
> >
> >> modules
> >>>> could
> >>>> > be SE 8 Specific. I heard, that is somehow like Spring does
> > it,
> >> too;-)
> >>>> >
> >>>> >
> >>>> > Werner
> >>>> >
> >>>> >
> >>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> >>>> > <rm...@gmail.com>
> >>>> > wrote:
> >>>> >
> >>>> >> Hi guys,
> >>>> >>
> >>>> >> I know we said java 8 is good to start a project but
> > this is
> >> a blocker
> >>>> >> to make of tamaya built in config solution in project
> > bound
> >> to java 7
> >>>> >> like JavaEE 7 containers for instance.
> >>>> >>
> >>>> >> Since Java 8 doesn't bring anything on implemtation
> > point
> >> of view we
> >>>> >> mandate/cant replace by java 7 can we rethink about it?
> >>>> >>
> >>>> >>
> >>>> >> Romain Manni-Bucau
> >>>> >> @rmannibucau
> >>>> >> http://www.tomitribe.com
> >>>> >> http://rmannibucau.wordpress.com
> >>>> >> https://github.com/rmannibucau
> >>>> >>
> >>>> >
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> *Anatole Tresch*
> >>> Java Engineer & Architect, JSR Spec Lead
> >>> Glärnischweg 10
> >>> CH - 8620 Wetzikon
> >>>
> >>> *Switzerland, Europe Zurich, GMT+1*
> >>> *Twitter: @atsticks*
> >>> *Blogs: **http://javaremarkables.blogspot.ch/
> >>> <http://javaremarkables.blogspot.ch/>*
> >>>
> >>> *Google: atsticksMobile +41-76 344 62 79*
> >>
> >
>
--
Otávio Gonçalves de Santana
blog: http://otaviosantana.blogspot.com.br/
twitter: http://twitter.com/otaviojava
site: *http://about.me/otaviojava <http://about.me/otaviojava>*
55 (11) 98255-3513
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
I tried to do some small tricks and it was actually really easy to implement a java7 version and base our java8 version in backward compatible ways on it.
I've pushed this to a fb-se7 branch on github.
https://github.com/struberg/incubator-tamaya/tree/fb-se7
The idea is to basically have 2 'versions' of the spec in one go.
The java7/api module provides an api which builds perfectly fine with Java7.
The java8/api module is 'backward compatible' to the Java7 api and adds the Optional etc features on top of it. I just had to tweak it a little bit.
For now I just did the API, but the impl is even less of a problem. Trying to check what we could reuse for the java7 impl as well.
LieGrue,
strub
> On Tuesday, 6 January 2015, 15:35, Mark Struberg <st...@yahoo.de> wrote:
> > I do see the benefits of Java8 but I also do see that not many can use it in
> production in the next 2 years. Thus it will not get adopted. We are in a phase
> of transaction right now.
>
> That's the reason why I proposed to try out both of em and compare them when
> we are done.
>
> Let me draft this up.
>
> LieGrue,
> strub
>
>
>
>
>
>
>> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> > ok so let fork tamaya to support java 7, who will backport to java 8
>> banch - yeah nobody will use j8 branch today?
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>>
>> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>>> Hi all
>>>
>>> I still think it is a real big mistake to go for Java 7. Do it in 8
> and
>>> provide a backport for 7. Not the other way round!
>>> Some additional remarks inline:
>>>
>>> Cheers
>>> Anatole
>>>
>>>
>>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>>
>>>> I'm also still not convinced.
>>>>
>>>> Let's step back a few meters and simply compare the benefits
> vs the
>>>> downsides
>>>>
>>>>
>>>> - PRO
>>>> * more 'modern'
>>>> * Optional
>>>> * Functions
>>>> * default methods in interfaces
>>>>
>>> + Streams
>>> + extended functions on collections
>>> + date time API
>>> + concurrent improvements
>>>
>>>
>>>
>>>> - CON
>>>> * not backward compatible
>>>> * blocks adoption in current containers
>>>>
>>> -> no. the EE7 TCK is not running on Java 7, but the containers do!
> Even
>>> bigger companies like Credit Suisse are thinking on replacing the JDK
>>> during next year.
>>>
>>>
>>>
>>>> * blocks adoption in many user projects
>>>>
>>> But as well is a prop compared to other libraries existing and will
> for
>>> sure boost support by other well known JUGs such as SouJava and LJC..
>>>
>>>
>>>
>>>> * we actually don't really need any of it's features
>>>>
>>> Of course, you can build things without it. But as I said, it is as
> you
>>> would build code in Java 1.4 without generics. One year later you will
> have
>>> to overhaul your API, or somebody else will come and do it in its own
>>> project. And most important: a JSR based on Java 7 will never be
> accepted
>>> by the EC. So stop crying for the past, go for the future (and provide
> a
>>> backport - should be doable in 2-3 hours for a release).
>>>
>>>
>>>
>>>> Let's face it: JDK8 is still not production ready. It is
> somewhat
>> slower
>>>> than Java7 still and I honestly know no single big project which
> runs
>> on
>>>> Java8. Not even the JavaEE7 TCK passes on Java8..
>>>
>>> As I said before, I know also bigger companies that probably will go
> to
>>> Java 8 rather soon. And honestly I do not care. I wanted to build with
> you
>>> guys a modern API, not an outdated one ;)
>>>
>>>
>>> Ad Optional:
>>>>
>>>> The discussion we had was around Optional. The only impact it has
> on me
>>>> now is that instead of
>>>>
>>>>
>>>> if (blabla != null) {...}
>>>>
>>>> I've seen
>>>>
>>>> if (blabla.isPresent()) {..}
>>>>
>>>
>>> Please read my blog as stated in one of my first mails related to the
>>> topic.
>>>
>>> Instead of
>>>
>>> Optional<T> get(String)
>>>
>>> you get
>>>
>>> T get(String key);
>>> T getOrDefault(String key);
>>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>>>
>>> Also all this must be done on your own, no fluent API for it ;(
>>>
>>> Most code I've seen simply don't use the ?. chain notation
> because
>> it only
>>>> works for 'navigation' use cases. Which we barely have
> (except
>> for
>>>> programmatic default values, but there are perfectly valid
> alternative
>>>> solutions as well).
>>>>
>>> I think its more that many programmers still did not have really
> worked
>>> with Java 8. For me it sounds like "the farmer only eats what he
>> knows".
>>> After having worked with Java 8 for some months now, I will never go
> back,
>>> if not necessary, really.
>>>
>>>
>>>> Ad Functions:
>>>> I've not yet seen a benefit in our current API. Actually the
> only
>> thing we
>>>> use it for currently is to replace 2 Comparator instances. I
> don't
>> think
>>>> this is something we could't do with SE7 as well ;)
>>>>
>>> There are several cases where it has benefits, eg the additional
> property
>>> function in Filter. Without Java 8 you have to create an additional
>>> interface for it. MOst advantages beside the new abstraction
> possibilities
>>> are in the implementation. Several things are so much easier with Java
> 8...
>>>
>>> Ad default methods in interfaces:
>>>> Actually I'm not a huge fan of all those convenience functions
> in
>> our
>>>> Configuration interface anyway. It just makes it harder to read.
>>>>
>>> SE is different than EE. You don't have CDI that helps a lot.
>> That's a
>>> fact as it is. I as well wish there will be more. Perhaps we get with
>>> Jigsaw some additional features, but I will not ask for going for Java
> 9 as
>>> a base for the API ;)
>>> Harder to read is to some part also a matter of taste. When these
> things
>>> feel cumbersome, my personal reaction is, you should work more with
> Java 8
>>> and you will love that you have to write less abstract classes, you
> dont
>>> have to expose additional singletons for accessing things and you can
>>> greatly help SPI implementors out of the API instead of providing
> abstract
>>> classes and create deps on your implementation...
>>>
>>>
>>>
>>>> What about adding either a branch or a module for java7?
>>>>
>>> Could be an option, as I always said.
>>>
>>>
>>>
>>> That way we could continue trying implement our core functionality
> with
>>>> both. And at the end of the day we do a resume and weight up the
> pros
>> and
>>>> cons again.
>>>>
>>> No, go for 8 and provide 7 in parallel by the colleagues that wants
> it.
>>> Since you state it is so important for the next decade there will be
> people
>>> that do the work, I assume. And don't complain if it is more work
> than
>>> expected, because you have to write much more code because you are now
> in
>> 7.
>>> But again, stop doing things for an outdated Java version, when you
> are
>>> building an API for a future JSR from scratch. It is simply useless
> IMO.
>>>
>>>
>>>
>>>>
>>>> LieGrue,
>>>> strub
>>>>
>>>>
>>>>
>>>>
>>>> > On Friday, 2 January 2015, 14:02, Werner Keil
>> <we...@gmail.com>
>>>> wrote:
>>>> > > Romain,
>>>> >
>>>> > That's a good point. I flagged this with e.g. JavaMoney.
> Given
>> it aims
>>>> more
>>>> > at future platforms and e.g. java.util.Currency (or ICU4J)
> are
>> already
>>>> > available for Java 7 or even 6 and before, that seemed of
> less
>> concern to
>>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x
> or 9,
>> so a
>>>> > theoretical ME usage of the API could work in a future
> version of
>> Java
>>>> > (ME), too.
>>>> >
>>>> > Here it's more about backward-compatibility, and looking
> at
>> other Apache
>>>> > projects like DeviceMap, etc. a majority requires at most
> Java 6
>> as
>>>> minimum
>>>> > version today. Some may have shifted to 7, but I couldn't
>
>> think of an
>>>> > Apache project that was Java 8 minimum. CDI 2 plans to do
> that, so
>> some
>>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
>> require
>>>> Java
>>>> > SE 8, but a prior version of the same projects or modules
> will
>> still work
>>>> > with CDI 1.x and Java 7.
>>>> >
>>>> > There are a few "functional" aspects, but if you
> need to
>> declare a
>>>> > "Functional Interface" that works in Java 7 and 8
> all
>> you have to do
>>>> > is
>>>> > forget about the SE 8 annotation. It'll still work in 8
> if
>> declared
>>>> right.
>>>> > So we might have to declare some of the interfaces without
> the
>>>> > @FunctionalInterface annotation (or comment it out for now)
> and
>> refrain
>>>> > from reusing those Java SE 8 provides. Stubbing them out with
>
>> either
>>>> config
>>>> > specific or the same method names would be a solution.
>>>> >
>>>> > Optional was discussed in a hangout last night, and I
> wasn't
>> under the
>>>> > impression we would have to use it in places where a simple
>> "null
>>>> > check"
>>>> > also works, so that doesn't look like a Java SE 8 feature
> to
>> be seen as
>>>> > mandadory or inevitable either.
>>>> >
>>>> > If the API was mostly portable, then some implementations or
>
>> modules
>>>> could
>>>> > be SE 8 Specific. I heard, that is somehow like Spring does
> it,
>> too;-)
>>>> >
>>>> >
>>>> > Werner
>>>> >
>>>> >
>>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>>>> > <rm...@gmail.com>
>>>> > wrote:
>>>> >
>>>> >> Hi guys,
>>>> >>
>>>> >> I know we said java 8 is good to start a project but
> this is
>> a blocker
>>>> >> to make of tamaya built in config solution in project
> bound
>> to java 7
>>>> >> like JavaEE 7 containers for instance.
>>>> >>
>>>> >> Since Java 8 doesn't bring anything on implemtation
> point
>> of view we
>>>> >> mandate/cant replace by java 7 can we rethink about it?
>>>> >>
>>>> >>
>>>> >> Romain Manni-Bucau
>>>> >> @rmannibucau
>>>> >> http://www.tomitribe.com
>>>> >> http://rmannibucau.wordpress.com
>>>> >> https://github.com/rmannibucau
>>>> >>
>>>> >
>>>>
>>>
>>>
>>>
>>> --
>>> *Anatole Tresch*
>>> Java Engineer & Architect, JSR Spec Lead
>>> Glärnischweg 10
>>> CH - 8620 Wetzikon
>>>
>>> *Switzerland, Europe Zurich, GMT+1*
>>> *Twitter: @atsticks*
>>> *Blogs: **http://javaremarkables.blogspot.ch/
>>> <http://javaremarkables.blogspot.ch/>*
>>>
>>> *Google: atsticksMobile +41-76 344 62 79*
>>
>
Re: java 8: really?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
+1
Le 6 janv. 2015 19:36, "Anatole Tresch" <at...@gmail.com> a écrit :
> I think the best will be to setup a Google form on this topic. If we agree
> on its content, we can spread it through Twitter and our SE, EE expert
> community and see what is the outcome...
> Werner Keil <we...@gmail.com> schrieb am Di., 6. Jan. 2015 um 18:37:
>
> > Ideally while a bit biased (by JUGs although I think the more EE centric
> > ones probably care much less about SE 8 yet;-) there you should try a
> > realistic survey of how many participants, their clients/companies or
> > projects have fully switched to Java SE 8 yet, how many would do if a
> Java
> > 6/7 app has a strong configuration need and how many can't afford that
> for
> > whatever reason;-)
> >
> > I'll submit something for CodeMotion, if accepted I probably won't make
> it
> > to JL this year as mentioned, otherwise let's see.
> > Are all of you doing talks there or some sent by their companies? (I know
> > for either JBoss or Tomitribe it is quite likely they have a sponsor
> > package;-)
> > Seen something on Mark doing a talk and of course Anatole.
> >
> > The JCP EC has a rather concrete plan now to meet before DevoXX UK. So EC
> > Members including former Apache rep Geir Magnusson (I assume either his
> > company sends him there or he might get support by Oracle) should be at
> the
> > F2F and many sound like they are eager to stay for an Adopt-a-JSR Summit,
> > too. This is no JSR of course, but if there's a Hackergarten at DevoXX UK
> > it might be another opportunity. Possibly colliding with a Hackergarten
> > Nuremberg, but in a larger project maybe not everyone will speak at
> DevoXX
> > UK or go there anyway?;-)
> >
> > Werner
> >
> > On Tue, Jan 6, 2015 at 5:36 PM, Anatole Tresch <at...@gmail.com>
> wrote:
> >
> > > Hi Mark
> > >
> > > fair enough, I am aware of that. Some of my colleagues already signed
> the
> > > ICLA and are a member of the project. The others will either be, or I
> > will
> > > add the patch. So this should be fine so far.
> > >
> > > I am curious how many will join after the next Hackergarten, since the
> > > interest was quite high and we are getting a real nice and small
> solution
> > > here, so probably many of them will help us improving things as well...
> > >
> > >
> > >
> > > 2015-01-06 17:28 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> > >
> > > > > I am quite sure I will be able to provide a Java 7 backport within
> > one
> > > > > evening with my hackergarten colleagues...
> > > >
> > > > Hackergarten is always nice. But please forget that in that case we
> > would
> > > > need an iCLA [1] on file for each of them. Or if the change is
> trivial
> > > the
> > > > respective author of each change could also add it as patch to our
> JIRA
> > > > [2]. In any case you must not commit stuff to any Apache SCM which
> you
> > > > didn't write yourself and we don't have any written grant [3] (thus
> the
> > > > JIRA patch). For multi author work we need a grant + an IP clearance
> > [4].
> > > >
> > > > This might sound like a bureaucratic burden but it is there for a
> good
> > > > reason. Oracle vs Google anyone? The ASF simply doesn't like to get
> > sued
> > > ;)
> > > >
> > > >
> > > >
> > > > LieGrue,
> > > > strub
> > > >
> > > >
> > > > [1] http://www.apache.org/licenses/icla.txt
> > > > [2] https://issues.apache.org/jira/browse/TAMAYA
> > > >
> > > > [3] http://apache.org/licenses/software-grant.txt
> > > > [4] http://incubator.apache.org/ip-clearance/ip-clearance-
> > template.html
> > > >
> > > >
> > > >
> > > > > On Tuesday, 6 January 2015, 15:55, Anatole Tresch <
> > atsticks@gmail.com>
> > > > wrote:
> > > > > > I can agree with that, because
> > > > > - we focus on the API (we still are not finished)
> > > > > - we work on the implementation
> > > > > - we build and design for the future
> > > > >
> > > > > AND
> > > > > - we provide support for Java 7, by backporting it.
> > > > >
> > > > > But backporting for me is crucial. By forward-porting we import all
> > the
> > > > > Java 7 API style, we would not want to have in a clean Java 8
> > > solution...
> > > > > I am quite sure I will be able to provide a Java 7 backport within
> > one
> > > > > evening with my hackergarten colleagues...
> > > > >
> > > > >
> > > > > 2015-01-06 15:34 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> > > > >
> > > > >> I do see the benefits of Java8 but I also do see that not many
> can
> > > use
> > > > it
> > > > >> in production in the next 2 years. Thus it will not get adopted.
> We
> > > > are in
> > > > >> a phase of transaction right now.
> > > > >>
> > > > >> That's the reason why I proposed to try out both of em and
> compare
> > > them
> > > > >> when we are done.
> > > > >>
> > > > >> Let me draft this up.
> > > > >>
> > > > >> LieGrue,
> > > > >> strub
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> > On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <
> > > > >> rmannibucau@gmail.com> wrote:
> > > > >> > > ok so let fork tamaya to support java 7, who will backport to
> > > > > java 8
> > > > >> > banch - yeah nobody will use j8 branch today?
> > > > >> >
> > > > >> >
> > > > >> > Romain Manni-Bucau
> > > > >> > @rmannibucau
> > > > >> > http://www.tomitribe.com
> > > > >> > http://rmannibucau.wordpress.com
> > > > >> > https://github.com/rmannibucau
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > 2015-01-06 15:18 GMT+01:00 Anatole Tresch <atsticks@gmail.com
> >:
> > > > >> >> Hi all
> > > > >> >>
> > > > >> >> I still think it is a real big mistake to go for Java 7. Do
> it
> > in
> > > > > 8 and
> > > > >> >> provide a backport for 7. Not the other way round!
> > > > >> >> Some additional remarks inline:
> > > > >> >>
> > > > >> >> Cheers
> > > > >> >> Anatole
> > > > >> >>
> > > > >> >>
> > > > >> >> 2015-01-06 14:26 GMT+01:00 Mark Struberg
> > > > > <st...@yahoo.de>:
> > > > >> >>
> > > > >> >>> I'm also still not convinced.
> > > > >> >>>
> > > > >> >>> Let's step back a few meters and simply compare the
> > > > > benefits vs the
> > > > >> >>> downsides
> > > > >> >>>
> > > > >> >>>
> > > > >> >>> - PRO
> > > > >> >>> * more 'modern'
> > > > >> >>> * Optional
> > > > >> >>> * Functions
> > > > >> >>> * default methods in interfaces
> > > > >> >>>
> > > > >> >> + Streams
> > > > >> >> + extended functions on collections
> > > > >> >> + date time API
> > > > >> >> + concurrent improvements
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>> - CON
> > > > >> >>> * not backward compatible
> > > > >> >>> * blocks adoption in current containers
> > > > >> >>>
> > > > >> >> -> no. the EE7 TCK is not running on Java 7, but the
> > > > > containers do!
> > > > >> Even
> > > > >> >> bigger companies like Credit Suisse are thinking on replacing
> > the
> > > > > JDK
> > > > >> >> during next year.
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>> * blocks adoption in many user projects
> > > > >> >>>
> > > > >> >> But as well is a prop compared to other libraries existing
> and
> > > > > will for
> > > > >> >> sure boost support by other well known JUGs such as SouJava
> and
> > > > > LJC..
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>> * we actually don't really need any of it's features
> > > > >> >>>
> > > > >> >> Of course, you can build things without it. But as I said, it
> > is
> > > > > as you
> > > > >> >> would build code in Java 1.4 without generics. One year later
> > you
> > > > > will
> > > > >> have
> > > > >> >> to overhaul your API, or somebody else will come and do it in
> > its
> > > > > own
> > > > >> >> project. And most important: a JSR based on Java 7 will never
> > be
> > > > >> accepted
> > > > >> >> by the EC. So stop crying for the past, go for the future
> (and
> > > > > provide
> > > > >> a
> > > > >> >> backport - should be doable in 2-3 hours for a release).
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>> Let's face it: JDK8 is still not production ready. It is
> > > > > somewhat
> > > > >> > slower
> > > > >> >>> than Java7 still and I honestly know no single big project
> > > > > which runs
> > > > >> > on
> > > > >> >>> Java8. Not even the JavaEE7 TCK passes on Java8..
> > > > >> >>
> > > > >> >> As I said before, I know also bigger companies that probably
> > will
> > > > > go to
> > > > >> >> Java 8 rather soon. And honestly I do not care. I wanted to
> > build
> > > > > with
> > > > >> you
> > > > >> >> guys a modern API, not an outdated one ;)
> > > > >> >>
> > > > >> >>
> > > > >> >> Ad Optional:
> > > > >> >>>
> > > > >> >>> The discussion we had was around Optional. The only impact
> it
> > > > > has on
> > > > >> me
> > > > >> >>> now is that instead of
> > > > >> >>>
> > > > >> >>>
> > > > >> >>> if (blabla != null) {...}
> > > > >> >>>
> > > > >> >>> I've seen
> > > > >> >>>
> > > > >> >>> if (blabla.isPresent()) {..}
> > > > >> >>>
> > > > >> >>
> > > > >> >> Please read my blog as stated in one of my first mails
> related
> > to
> > > > > the
> > > > >> >> topic.
> > > > >> >>
> > > > >> >> Instead of
> > > > >> >>
> > > > >> >> Optional<T> get(String)
> > > > >> >>
> > > > >> >> you get
> > > > >> >>
> > > > >> >> T get(String key);
> > > > >> >> T getOrDefault(String key);
> > > > >> >> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> > > > >> >>
> > > > >> >> Also all this must be done on your own, no fluent API for it
> ;(
> > > > >> >>
> > > > >> >> Most code I've seen simply don't use the ?. chain
> > > > > notation because
> > > > >> > it only
> > > > >> >>> works for 'navigation' use cases. Which we barely
> > > > > have (except
> > > > >> > for
> > > > >> >>> programmatic default values, but there are perfectly valid
> > > > > alternative
> > > > >> >>> solutions as well).
> > > > >> >>>
> > > > >> >> I think its more that many programmers still did not have
> > really
> > > > > worked
> > > > >> >> with Java 8. For me it sounds like "the farmer only eats
> > > > > what he
> > > > >> > knows".
> > > > >> >> After having worked with Java 8 for some months now, I will
> > never
> > > > > go
> > > > >> back,
> > > > >> >> if not necessary, really.
> > > > >> >>
> > > > >> >>
> > > > >> >>> Ad Functions:
> > > > >> >>> I've not yet seen a benefit in our current API. Actually
> > > > > the only
> > > > >> > thing we
> > > > >> >>> use it for currently is to replace 2 Comparator instances. I
> > > > > don't
> > > > >> > think
> > > > >> >>> this is something we could't do with SE7 as well ;)
> > > > >> >>>
> > > > >> >> There are several cases where it has benefits, eg the
> > additional
> > > > >> property
> > > > >> >> function in Filter. Without Java 8 you have to create an
> > > > > additional
> > > > >> >> interface for it. MOst advantages beside the new abstraction
> > > > >> possibilities
> > > > >> >> are in the implementation. Several things are so much easier
> > with
> > > > > Java
> > > > >> 8...
> > > > >> >>
> > > > >> >> Ad default methods in interfaces:
> > > > >> >>> Actually I'm not a huge fan of all those convenience
> > > > > functions in
> > > > >> > our
> > > > >> >>> Configuration interface anyway. It just makes it harder to
> > > > > read.
> > > > >> >>>
> > > > >> >> SE is different than EE. You don't have CDI that helps a lot.
> > > > >> > That's a
> > > > >> >> fact as it is. I as well wish there will be more. Perhaps we
> > get
> > > > > with
> > > > >> >> Jigsaw some additional features, but I will not ask for going
> > for
> > > > > Java
> > > > >> 9 as
> > > > >> >> a base for the API ;)
> > > > >> >> Harder to read is to some part also a matter of taste. When
> > these
> > > > >> things
> > > > >> >> feel cumbersome, my personal reaction is, you should work
> more
> > > > > with
> > > > >> Java 8
> > > > >> >> and you will love that you have to write less abstract
> classes,
> > > > > you
> > > > >> dont
> > > > >> >> have to expose additional singletons for accessing things and
> > you
> > > > > can
> > > > >> >> greatly help SPI implementors out of the API instead of
> > providing
> > > > >> abstract
> > > > >> >> classes and create deps on your implementation...
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>> What about adding either a branch or a module for java7?
> > > > >> >>>
> > > > >> >> Could be an option, as I always said.
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >> That way we could continue trying implement our core
> > > > > functionality with
> > > > >> >>> both. And at the end of the day we do a resume and weight up
> > > > > the pros
> > > > >> > and
> > > > >> >>> cons again.
> > > > >> >>>
> > > > >> >> No, go for 8 and provide 7 in parallel by the colleagues that
> > > > > wants it.
> > > > >> >> Since you state it is so important for the next decade there
> > will
> > > > > be
> > > > >> people
> > > > >> >> that do the work, I assume. And don't complain if it is more
> > > > > work than
> > > > >> >> expected, because you have to write much more code because
> you
> > > > > are now
> > > > >> in
> > > > >> > 7.
> > > > >> >> But again, stop doing things for an outdated Java version,
> when
> > > > > you are
> > > > >> >> building an API for a future JSR from scratch. It is simply
> > > > > useless
> > > > >> IMO.
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>>
> > > > >> >>> LieGrue,
> > > > >> >>> strub
> > > > >> >>>
> > > > >> >>>
> > > > >> >>>
> > > > >> >>>
> > > > >> >>> > On Friday, 2 January 2015, 14:02, Werner Keil
> > > > >> > <we...@gmail.com>
> > > > >> >>> wrote:
> > > > >> >>> > > Romain,
> > > > >> >>> >
> > > > >> >>> > That's a good point. I flagged this with e.g.
> > > > > JavaMoney. Given
> > > > >> > it aims
> > > > >> >>> more
> > > > >> >>> > at future platforms and e.g. java.util.Currency (or
> > > > > ICU4J) are
> > > > >> > already
> > > > >> >>> > available for Java 7 or even 6 and before, that seemed
> > > > > of less
> > > > >> > concern to
> > > > >> >>> > the EG or Anatole. Oracle stated, Lambdas may come to ME
> > > > > 8.x or 9,
> > > > >> > so a
> > > > >> >>> > theoretical ME usage of the API could work in a future
> > > > > version of
> > > > >> > Java
> > > > >> >>> > (ME), too.
> > > > >> >>> >
> > > > >> >>> > Here it's more about backward-compatibility, and
> > > > > looking at
> > > > >> > other Apache
> > > > >> >>> > projects like DeviceMap, etc. a majority requires at
> > > > > most Java 6
> > > > >> > as
> > > > >> >>> minimum
> > > > >> >>> > version today. Some may have shifted to 7, but I
> > > > > couldn't
> > > > >> > think of an
> > > > >> >>> > Apache project that was Java 8 minimum. CDI 2 plans to
> > > > > do that, so
> > > > >> > some
> > > > >> >>> > modules in DeltaSpike could eventually graduate to CDI 2
> > > > > and
> > > > >> > require
> > > > >> >>> Java
> > > > >> >>> > SE 8, but a prior version of the same projects or
> > > > > modules will
> > > > >> > still work
> > > > >> >>> > with CDI 1.x and Java 7.
> > > > >> >>> >
> > > > >> >>> > There are a few "functional" aspects, but if
> > > > > you need to
> > > > >> > declare a
> > > > >> >>> > "Functional Interface" that works in Java 7
> > > > > and 8 all
> > > > >> > you have to do
> > > > >> >>> > is
> > > > >> >>> > forget about the SE 8 annotation. It'll still work
> > > > > in 8 if
> > > > >> > declared
> > > > >> >>> right.
> > > > >> >>> > So we might have to declare some of the interfaces
> > > > > without the
> > > > >> >>> > @FunctionalInterface annotation (or comment it out for
> > > > > now) and
> > > > >> > refrain
> > > > >> >>> > from reusing those Java SE 8 provides. Stubbing them out
> > > > > with
> > > > >> > either
> > > > >> >>> config
> > > > >> >>> > specific or the same method names would be a solution.
> > > > >> >>> >
> > > > >> >>> > Optional was discussed in a hangout last night, and I
> > > > > wasn't
> > > > >> > under the
> > > > >> >>> > impression we would have to use it in places where a
> > > > > simple
> > > > >> > "null
> > > > >> >>> > check"
> > > > >> >>> > also works, so that doesn't look like a Java SE 8
> > > > > feature to
> > > > >> > be seen as
> > > > >> >>> > mandadory or inevitable either.
> > > > >> >>> >
> > > > >> >>> > If the API was mostly portable, then some
> > > > > implementations or
> > > > >> > modules
> > > > >> >>> could
> > > > >> >>> > be SE 8 Specific. I heard, that is somehow like Spring
> > > > > does it,
> > > > >> > too;-)
> > > > >> >>> >
> > > > >> >>> >
> > > > >> >>> > Werner
> > > > >> >>> >
> > > > >> >>> >
> > > > >> >>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > > > >> >>> > <rm...@gmail.com>
> > > > >> >>> > wrote:
> > > > >> >>> >
> > > > >> >>> >> Hi guys,
> > > > >> >>> >>
> > > > >> >>> >> I know we said java 8 is good to start a project
> > > > > but this is
> > > > >> > a blocker
> > > > >> >>> >> to make of tamaya built in config solution in
> > > > > project bound
> > > > >> > to java 7
> > > > >> >>> >> like JavaEE 7 containers for instance.
> > > > >> >>> >>
> > > > >> >>> >> Since Java 8 doesn't bring anything on
> > > > > implemtation point
> > > > >> > of view we
> > > > >> >>> >> mandate/cant replace by java 7 can we rethink about
> > > > > it?
> > > > >> >>> >>
> > > > >> >>> >>
> > > > >> >>> >> Romain Manni-Bucau
> > > > >> >>> >> @rmannibucau
> > > > >> >>> >> http://www.tomitribe.com
> > > > >> >>> >> http://rmannibucau.wordpress.com
> > > > >> >>> >> https://github.com/rmannibucau
> > > > >> >>> >>
> > > > >> >>> >
> > > > >> >>>
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >> --
> > > > >> >> *Anatole Tresch*
> > > > >> >> Java Engineer & Architect, JSR Spec Lead
> > > > >> >> Glärnischweg 10
> > > > >> >> CH - 8620 Wetzikon
> > > > >> >>
> > > > >> >> *Switzerland, Europe Zurich, GMT+1*
> > > > >> >> *Twitter: @atsticks*
> > > > >> >> *Blogs: **http://javaremarkables.blogspot.ch/
> > > > >> >> <http://javaremarkables.blogspot.ch/>*
> > > > >> >>
> > > > >> >> *Google: atsticksMobile +41-76 344 62 79*
> > > > >
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *Anatole Tresch*
> > > > > Java Engineer & Architect, JSR Spec Lead
> > > > > Glärnischweg 10
> > > > > CH - 8620 Wetzikon
> > > > >
> > > > > *Switzerland, Europe Zurich, GMT+1*
> > > > > *Twitter: @atsticks*
> > > > > *Blogs: **http://javaremarkables.blogspot.ch/
> > > > > <http://javaremarkables.blogspot.ch/>*
> > > > >
> > > > > *Google: atsticksMobile +41-76 344 62 79*
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > *Anatole Tresch*
> > > Java Engineer & Architect, JSR Spec Lead
> > > Glärnischweg 10
> > > CH - 8620 Wetzikon
> > >
> > > *Switzerland, Europe Zurich, GMT+1*
> > > *Twitter: @atsticks*
> > > *Blogs: **http://javaremarkables.blogspot.ch/
> > > <http://javaremarkables.blogspot.ch/>*
> > >
> > > *Google: atsticksMobile +41-76 344 62 79*
> > >
> >
>
Re: java 8: really?
Posted by Anatole Tresch <at...@gmail.com>.
I think the best will be to setup a Google form on this topic. If we agree
on its content, we can spread it through Twitter and our SE, EE expert
community and see what is the outcome...
Werner Keil <we...@gmail.com> schrieb am Di., 6. Jan. 2015 um 18:37:
> Ideally while a bit biased (by JUGs although I think the more EE centric
> ones probably care much less about SE 8 yet;-) there you should try a
> realistic survey of how many participants, their clients/companies or
> projects have fully switched to Java SE 8 yet, how many would do if a Java
> 6/7 app has a strong configuration need and how many can't afford that for
> whatever reason;-)
>
> I'll submit something for CodeMotion, if accepted I probably won't make it
> to JL this year as mentioned, otherwise let's see.
> Are all of you doing talks there or some sent by their companies? (I know
> for either JBoss or Tomitribe it is quite likely they have a sponsor
> package;-)
> Seen something on Mark doing a talk and of course Anatole.
>
> The JCP EC has a rather concrete plan now to meet before DevoXX UK. So EC
> Members including former Apache rep Geir Magnusson (I assume either his
> company sends him there or he might get support by Oracle) should be at the
> F2F and many sound like they are eager to stay for an Adopt-a-JSR Summit,
> too. This is no JSR of course, but if there's a Hackergarten at DevoXX UK
> it might be another opportunity. Possibly colliding with a Hackergarten
> Nuremberg, but in a larger project maybe not everyone will speak at DevoXX
> UK or go there anyway?;-)
>
> Werner
>
> On Tue, Jan 6, 2015 at 5:36 PM, Anatole Tresch <at...@gmail.com> wrote:
>
> > Hi Mark
> >
> > fair enough, I am aware of that. Some of my colleagues already signed the
> > ICLA and are a member of the project. The others will either be, or I
> will
> > add the patch. So this should be fine so far.
> >
> > I am curious how many will join after the next Hackergarten, since the
> > interest was quite high and we are getting a real nice and small solution
> > here, so probably many of them will help us improving things as well...
> >
> >
> >
> > 2015-01-06 17:28 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >
> > > > I am quite sure I will be able to provide a Java 7 backport within
> one
> > > > evening with my hackergarten colleagues...
> > >
> > > Hackergarten is always nice. But please forget that in that case we
> would
> > > need an iCLA [1] on file for each of them. Or if the change is trivial
> > the
> > > respective author of each change could also add it as patch to our JIRA
> > > [2]. In any case you must not commit stuff to any Apache SCM which you
> > > didn't write yourself and we don't have any written grant [3] (thus the
> > > JIRA patch). For multi author work we need a grant + an IP clearance
> [4].
> > >
> > > This might sound like a bureaucratic burden but it is there for a good
> > > reason. Oracle vs Google anyone? The ASF simply doesn't like to get
> sued
> > ;)
> > >
> > >
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > > [1] http://www.apache.org/licenses/icla.txt
> > > [2] https://issues.apache.org/jira/browse/TAMAYA
> > >
> > > [3] http://apache.org/licenses/software-grant.txt
> > > [4] http://incubator.apache.org/ip-clearance/ip-clearance-
> template.html
> > >
> > >
> > >
> > > > On Tuesday, 6 January 2015, 15:55, Anatole Tresch <
> atsticks@gmail.com>
> > > wrote:
> > > > > I can agree with that, because
> > > > - we focus on the API (we still are not finished)
> > > > - we work on the implementation
> > > > - we build and design for the future
> > > >
> > > > AND
> > > > - we provide support for Java 7, by backporting it.
> > > >
> > > > But backporting for me is crucial. By forward-porting we import all
> the
> > > > Java 7 API style, we would not want to have in a clean Java 8
> > solution...
> > > > I am quite sure I will be able to provide a Java 7 backport within
> one
> > > > evening with my hackergarten colleagues...
> > > >
> > > >
> > > > 2015-01-06 15:34 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> > > >
> > > >> I do see the benefits of Java8 but I also do see that not many can
> > use
> > > it
> > > >> in production in the next 2 years. Thus it will not get adopted. We
> > > are in
> > > >> a phase of transaction right now.
> > > >>
> > > >> That's the reason why I proposed to try out both of em and compare
> > them
> > > >> when we are done.
> > > >>
> > > >> Let me draft this up.
> > > >>
> > > >> LieGrue,
> > > >> strub
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> > On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <
> > > >> rmannibucau@gmail.com> wrote:
> > > >> > > ok so let fork tamaya to support java 7, who will backport to
> > > > java 8
> > > >> > banch - yeah nobody will use j8 branch today?
> > > >> >
> > > >> >
> > > >> > Romain Manni-Bucau
> > > >> > @rmannibucau
> > > >> > http://www.tomitribe.com
> > > >> > http://rmannibucau.wordpress.com
> > > >> > https://github.com/rmannibucau
> > > >> >
> > > >> >
> > > >> >
> > > >> > 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > > >> >> Hi all
> > > >> >>
> > > >> >> I still think it is a real big mistake to go for Java 7. Do it
> in
> > > > 8 and
> > > >> >> provide a backport for 7. Not the other way round!
> > > >> >> Some additional remarks inline:
> > > >> >>
> > > >> >> Cheers
> > > >> >> Anatole
> > > >> >>
> > > >> >>
> > > >> >> 2015-01-06 14:26 GMT+01:00 Mark Struberg
> > > > <st...@yahoo.de>:
> > > >> >>
> > > >> >>> I'm also still not convinced.
> > > >> >>>
> > > >> >>> Let's step back a few meters and simply compare the
> > > > benefits vs the
> > > >> >>> downsides
> > > >> >>>
> > > >> >>>
> > > >> >>> - PRO
> > > >> >>> * more 'modern'
> > > >> >>> * Optional
> > > >> >>> * Functions
> > > >> >>> * default methods in interfaces
> > > >> >>>
> > > >> >> + Streams
> > > >> >> + extended functions on collections
> > > >> >> + date time API
> > > >> >> + concurrent improvements
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>> - CON
> > > >> >>> * not backward compatible
> > > >> >>> * blocks adoption in current containers
> > > >> >>>
> > > >> >> -> no. the EE7 TCK is not running on Java 7, but the
> > > > containers do!
> > > >> Even
> > > >> >> bigger companies like Credit Suisse are thinking on replacing
> the
> > > > JDK
> > > >> >> during next year.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>> * blocks adoption in many user projects
> > > >> >>>
> > > >> >> But as well is a prop compared to other libraries existing and
> > > > will for
> > > >> >> sure boost support by other well known JUGs such as SouJava and
> > > > LJC..
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>> * we actually don't really need any of it's features
> > > >> >>>
> > > >> >> Of course, you can build things without it. But as I said, it
> is
> > > > as you
> > > >> >> would build code in Java 1.4 without generics. One year later
> you
> > > > will
> > > >> have
> > > >> >> to overhaul your API, or somebody else will come and do it in
> its
> > > > own
> > > >> >> project. And most important: a JSR based on Java 7 will never
> be
> > > >> accepted
> > > >> >> by the EC. So stop crying for the past, go for the future (and
> > > > provide
> > > >> a
> > > >> >> backport - should be doable in 2-3 hours for a release).
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>> Let's face it: JDK8 is still not production ready. It is
> > > > somewhat
> > > >> > slower
> > > >> >>> than Java7 still and I honestly know no single big project
> > > > which runs
> > > >> > on
> > > >> >>> Java8. Not even the JavaEE7 TCK passes on Java8..
> > > >> >>
> > > >> >> As I said before, I know also bigger companies that probably
> will
> > > > go to
> > > >> >> Java 8 rather soon. And honestly I do not care. I wanted to
> build
> > > > with
> > > >> you
> > > >> >> guys a modern API, not an outdated one ;)
> > > >> >>
> > > >> >>
> > > >> >> Ad Optional:
> > > >> >>>
> > > >> >>> The discussion we had was around Optional. The only impact it
> > > > has on
> > > >> me
> > > >> >>> now is that instead of
> > > >> >>>
> > > >> >>>
> > > >> >>> if (blabla != null) {...}
> > > >> >>>
> > > >> >>> I've seen
> > > >> >>>
> > > >> >>> if (blabla.isPresent()) {..}
> > > >> >>>
> > > >> >>
> > > >> >> Please read my blog as stated in one of my first mails related
> to
> > > > the
> > > >> >> topic.
> > > >> >>
> > > >> >> Instead of
> > > >> >>
> > > >> >> Optional<T> get(String)
> > > >> >>
> > > >> >> you get
> > > >> >>
> > > >> >> T get(String key);
> > > >> >> T getOrDefault(String key);
> > > >> >> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> > > >> >>
> > > >> >> Also all this must be done on your own, no fluent API for it ;(
> > > >> >>
> > > >> >> Most code I've seen simply don't use the ?. chain
> > > > notation because
> > > >> > it only
> > > >> >>> works for 'navigation' use cases. Which we barely
> > > > have (except
> > > >> > for
> > > >> >>> programmatic default values, but there are perfectly valid
> > > > alternative
> > > >> >>> solutions as well).
> > > >> >>>
> > > >> >> I think its more that many programmers still did not have
> really
> > > > worked
> > > >> >> with Java 8. For me it sounds like "the farmer only eats
> > > > what he
> > > >> > knows".
> > > >> >> After having worked with Java 8 for some months now, I will
> never
> > > > go
> > > >> back,
> > > >> >> if not necessary, really.
> > > >> >>
> > > >> >>
> > > >> >>> Ad Functions:
> > > >> >>> I've not yet seen a benefit in our current API. Actually
> > > > the only
> > > >> > thing we
> > > >> >>> use it for currently is to replace 2 Comparator instances. I
> > > > don't
> > > >> > think
> > > >> >>> this is something we could't do with SE7 as well ;)
> > > >> >>>
> > > >> >> There are several cases where it has benefits, eg the
> additional
> > > >> property
> > > >> >> function in Filter. Without Java 8 you have to create an
> > > > additional
> > > >> >> interface for it. MOst advantages beside the new abstraction
> > > >> possibilities
> > > >> >> are in the implementation. Several things are so much easier
> with
> > > > Java
> > > >> 8...
> > > >> >>
> > > >> >> Ad default methods in interfaces:
> > > >> >>> Actually I'm not a huge fan of all those convenience
> > > > functions in
> > > >> > our
> > > >> >>> Configuration interface anyway. It just makes it harder to
> > > > read.
> > > >> >>>
> > > >> >> SE is different than EE. You don't have CDI that helps a lot.
> > > >> > That's a
> > > >> >> fact as it is. I as well wish there will be more. Perhaps we
> get
> > > > with
> > > >> >> Jigsaw some additional features, but I will not ask for going
> for
> > > > Java
> > > >> 9 as
> > > >> >> a base for the API ;)
> > > >> >> Harder to read is to some part also a matter of taste. When
> these
> > > >> things
> > > >> >> feel cumbersome, my personal reaction is, you should work more
> > > > with
> > > >> Java 8
> > > >> >> and you will love that you have to write less abstract classes,
> > > > you
> > > >> dont
> > > >> >> have to expose additional singletons for accessing things and
> you
> > > > can
> > > >> >> greatly help SPI implementors out of the API instead of
> providing
> > > >> abstract
> > > >> >> classes and create deps on your implementation...
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>> What about adding either a branch or a module for java7?
> > > >> >>>
> > > >> >> Could be an option, as I always said.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> That way we could continue trying implement our core
> > > > functionality with
> > > >> >>> both. And at the end of the day we do a resume and weight up
> > > > the pros
> > > >> > and
> > > >> >>> cons again.
> > > >> >>>
> > > >> >> No, go for 8 and provide 7 in parallel by the colleagues that
> > > > wants it.
> > > >> >> Since you state it is so important for the next decade there
> will
> > > > be
> > > >> people
> > > >> >> that do the work, I assume. And don't complain if it is more
> > > > work than
> > > >> >> expected, because you have to write much more code because you
> > > > are now
> > > >> in
> > > >> > 7.
> > > >> >> But again, stop doing things for an outdated Java version, when
> > > > you are
> > > >> >> building an API for a future JSR from scratch. It is simply
> > > > useless
> > > >> IMO.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>>
> > > >> >>> LieGrue,
> > > >> >>> strub
> > > >> >>>
> > > >> >>>
> > > >> >>>
> > > >> >>>
> > > >> >>> > On Friday, 2 January 2015, 14:02, Werner Keil
> > > >> > <we...@gmail.com>
> > > >> >>> wrote:
> > > >> >>> > > Romain,
> > > >> >>> >
> > > >> >>> > That's a good point. I flagged this with e.g.
> > > > JavaMoney. Given
> > > >> > it aims
> > > >> >>> more
> > > >> >>> > at future platforms and e.g. java.util.Currency (or
> > > > ICU4J) are
> > > >> > already
> > > >> >>> > available for Java 7 or even 6 and before, that seemed
> > > > of less
> > > >> > concern to
> > > >> >>> > the EG or Anatole. Oracle stated, Lambdas may come to ME
> > > > 8.x or 9,
> > > >> > so a
> > > >> >>> > theoretical ME usage of the API could work in a future
> > > > version of
> > > >> > Java
> > > >> >>> > (ME), too.
> > > >> >>> >
> > > >> >>> > Here it's more about backward-compatibility, and
> > > > looking at
> > > >> > other Apache
> > > >> >>> > projects like DeviceMap, etc. a majority requires at
> > > > most Java 6
> > > >> > as
> > > >> >>> minimum
> > > >> >>> > version today. Some may have shifted to 7, but I
> > > > couldn't
> > > >> > think of an
> > > >> >>> > Apache project that was Java 8 minimum. CDI 2 plans to
> > > > do that, so
> > > >> > some
> > > >> >>> > modules in DeltaSpike could eventually graduate to CDI 2
> > > > and
> > > >> > require
> > > >> >>> Java
> > > >> >>> > SE 8, but a prior version of the same projects or
> > > > modules will
> > > >> > still work
> > > >> >>> > with CDI 1.x and Java 7.
> > > >> >>> >
> > > >> >>> > There are a few "functional" aspects, but if
> > > > you need to
> > > >> > declare a
> > > >> >>> > "Functional Interface" that works in Java 7
> > > > and 8 all
> > > >> > you have to do
> > > >> >>> > is
> > > >> >>> > forget about the SE 8 annotation. It'll still work
> > > > in 8 if
> > > >> > declared
> > > >> >>> right.
> > > >> >>> > So we might have to declare some of the interfaces
> > > > without the
> > > >> >>> > @FunctionalInterface annotation (or comment it out for
> > > > now) and
> > > >> > refrain
> > > >> >>> > from reusing those Java SE 8 provides. Stubbing them out
> > > > with
> > > >> > either
> > > >> >>> config
> > > >> >>> > specific or the same method names would be a solution.
> > > >> >>> >
> > > >> >>> > Optional was discussed in a hangout last night, and I
> > > > wasn't
> > > >> > under the
> > > >> >>> > impression we would have to use it in places where a
> > > > simple
> > > >> > "null
> > > >> >>> > check"
> > > >> >>> > also works, so that doesn't look like a Java SE 8
> > > > feature to
> > > >> > be seen as
> > > >> >>> > mandadory or inevitable either.
> > > >> >>> >
> > > >> >>> > If the API was mostly portable, then some
> > > > implementations or
> > > >> > modules
> > > >> >>> could
> > > >> >>> > be SE 8 Specific. I heard, that is somehow like Spring
> > > > does it,
> > > >> > too;-)
> > > >> >>> >
> > > >> >>> >
> > > >> >>> > Werner
> > > >> >>> >
> > > >> >>> >
> > > >> >>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > > >> >>> > <rm...@gmail.com>
> > > >> >>> > wrote:
> > > >> >>> >
> > > >> >>> >> Hi guys,
> > > >> >>> >>
> > > >> >>> >> I know we said java 8 is good to start a project
> > > > but this is
> > > >> > a blocker
> > > >> >>> >> to make of tamaya built in config solution in
> > > > project bound
> > > >> > to java 7
> > > >> >>> >> like JavaEE 7 containers for instance.
> > > >> >>> >>
> > > >> >>> >> Since Java 8 doesn't bring anything on
> > > > implemtation point
> > > >> > of view we
> > > >> >>> >> mandate/cant replace by java 7 can we rethink about
> > > > it?
> > > >> >>> >>
> > > >> >>> >>
> > > >> >>> >> Romain Manni-Bucau
> > > >> >>> >> @rmannibucau
> > > >> >>> >> http://www.tomitribe.com
> > > >> >>> >> http://rmannibucau.wordpress.com
> > > >> >>> >> https://github.com/rmannibucau
> > > >> >>> >>
> > > >> >>> >
> > > >> >>>
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> *Anatole Tresch*
> > > >> >> Java Engineer & Architect, JSR Spec Lead
> > > >> >> Glärnischweg 10
> > > >> >> CH - 8620 Wetzikon
> > > >> >>
> > > >> >> *Switzerland, Europe Zurich, GMT+1*
> > > >> >> *Twitter: @atsticks*
> > > >> >> *Blogs: **http://javaremarkables.blogspot.ch/
> > > >> >> <http://javaremarkables.blogspot.ch/>*
> > > >> >>
> > > >> >> *Google: atsticksMobile +41-76 344 62 79*
> > > >
> > > >> >
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > *Anatole Tresch*
> > > > Java Engineer & Architect, JSR Spec Lead
> > > > Glärnischweg 10
> > > > CH - 8620 Wetzikon
> > > >
> > > > *Switzerland, Europe Zurich, GMT+1*
> > > > *Twitter: @atsticks*
> > > > *Blogs: **http://javaremarkables.blogspot.ch/
> > > > <http://javaremarkables.blogspot.ch/>*
> > > >
> > > > *Google: atsticksMobile +41-76 344 62 79*
> > > >
> > >
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
> >
>
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
Ideally while a bit biased (by JUGs although I think the more EE centric
ones probably care much less about SE 8 yet;-) there you should try a
realistic survey of how many participants, their clients/companies or
projects have fully switched to Java SE 8 yet, how many would do if a Java
6/7 app has a strong configuration need and how many can't afford that for
whatever reason;-)
I'll submit something for CodeMotion, if accepted I probably won't make it
to JL this year as mentioned, otherwise let's see.
Are all of you doing talks there or some sent by their companies? (I know
for either JBoss or Tomitribe it is quite likely they have a sponsor
package;-)
Seen something on Mark doing a talk and of course Anatole.
The JCP EC has a rather concrete plan now to meet before DevoXX UK. So EC
Members including former Apache rep Geir Magnusson (I assume either his
company sends him there or he might get support by Oracle) should be at the
F2F and many sound like they are eager to stay for an Adopt-a-JSR Summit,
too. This is no JSR of course, but if there's a Hackergarten at DevoXX UK
it might be another opportunity. Possibly colliding with a Hackergarten
Nuremberg, but in a larger project maybe not everyone will speak at DevoXX
UK or go there anyway?;-)
Werner
On Tue, Jan 6, 2015 at 5:36 PM, Anatole Tresch <at...@gmail.com> wrote:
> Hi Mark
>
> fair enough, I am aware of that. Some of my colleagues already signed the
> ICLA and are a member of the project. The others will either be, or I will
> add the patch. So this should be fine so far.
>
> I am curious how many will join after the next Hackergarten, since the
> interest was quite high and we are getting a real nice and small solution
> here, so probably many of them will help us improving things as well...
>
>
>
> 2015-01-06 17:28 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>
> > > I am quite sure I will be able to provide a Java 7 backport within one
> > > evening with my hackergarten colleagues...
> >
> > Hackergarten is always nice. But please forget that in that case we would
> > need an iCLA [1] on file for each of them. Or if the change is trivial
> the
> > respective author of each change could also add it as patch to our JIRA
> > [2]. In any case you must not commit stuff to any Apache SCM which you
> > didn't write yourself and we don't have any written grant [3] (thus the
> > JIRA patch). For multi author work we need a grant + an IP clearance [4].
> >
> > This might sound like a bureaucratic burden but it is there for a good
> > reason. Oracle vs Google anyone? The ASF simply doesn't like to get sued
> ;)
> >
> >
> >
> > LieGrue,
> > strub
> >
> >
> > [1] http://www.apache.org/licenses/icla.txt
> > [2] https://issues.apache.org/jira/browse/TAMAYA
> >
> > [3] http://apache.org/licenses/software-grant.txt
> > [4] http://incubator.apache.org/ip-clearance/ip-clearance-template.html
> >
> >
> >
> > > On Tuesday, 6 January 2015, 15:55, Anatole Tresch <at...@gmail.com>
> > wrote:
> > > > I can agree with that, because
> > > - we focus on the API (we still are not finished)
> > > - we work on the implementation
> > > - we build and design for the future
> > >
> > > AND
> > > - we provide support for Java 7, by backporting it.
> > >
> > > But backporting for me is crucial. By forward-porting we import all the
> > > Java 7 API style, we would not want to have in a clean Java 8
> solution...
> > > I am quite sure I will be able to provide a Java 7 backport within one
> > > evening with my hackergarten colleagues...
> > >
> > >
> > > 2015-01-06 15:34 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> > >
> > >> I do see the benefits of Java8 but I also do see that not many can
> use
> > it
> > >> in production in the next 2 years. Thus it will not get adopted. We
> > are in
> > >> a phase of transaction right now.
> > >>
> > >> That's the reason why I proposed to try out both of em and compare
> them
> > >> when we are done.
> > >>
> > >> Let me draft this up.
> > >>
> > >> LieGrue,
> > >> strub
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> > On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <
> > >> rmannibucau@gmail.com> wrote:
> > >> > > ok so let fork tamaya to support java 7, who will backport to
> > > java 8
> > >> > banch - yeah nobody will use j8 branch today?
> > >> >
> > >> >
> > >> > Romain Manni-Bucau
> > >> > @rmannibucau
> > >> > http://www.tomitribe.com
> > >> > http://rmannibucau.wordpress.com
> > >> > https://github.com/rmannibucau
> > >> >
> > >> >
> > >> >
> > >> > 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > >> >> Hi all
> > >> >>
> > >> >> I still think it is a real big mistake to go for Java 7. Do it in
> > > 8 and
> > >> >> provide a backport for 7. Not the other way round!
> > >> >> Some additional remarks inline:
> > >> >>
> > >> >> Cheers
> > >> >> Anatole
> > >> >>
> > >> >>
> > >> >> 2015-01-06 14:26 GMT+01:00 Mark Struberg
> > > <st...@yahoo.de>:
> > >> >>
> > >> >>> I'm also still not convinced.
> > >> >>>
> > >> >>> Let's step back a few meters and simply compare the
> > > benefits vs the
> > >> >>> downsides
> > >> >>>
> > >> >>>
> > >> >>> - PRO
> > >> >>> * more 'modern'
> > >> >>> * Optional
> > >> >>> * Functions
> > >> >>> * default methods in interfaces
> > >> >>>
> > >> >> + Streams
> > >> >> + extended functions on collections
> > >> >> + date time API
> > >> >> + concurrent improvements
> > >> >>
> > >> >>
> > >> >>
> > >> >>> - CON
> > >> >>> * not backward compatible
> > >> >>> * blocks adoption in current containers
> > >> >>>
> > >> >> -> no. the EE7 TCK is not running on Java 7, but the
> > > containers do!
> > >> Even
> > >> >> bigger companies like Credit Suisse are thinking on replacing the
> > > JDK
> > >> >> during next year.
> > >> >>
> > >> >>
> > >> >>
> > >> >>> * blocks adoption in many user projects
> > >> >>>
> > >> >> But as well is a prop compared to other libraries existing and
> > > will for
> > >> >> sure boost support by other well known JUGs such as SouJava and
> > > LJC..
> > >> >>
> > >> >>
> > >> >>
> > >> >>> * we actually don't really need any of it's features
> > >> >>>
> > >> >> Of course, you can build things without it. But as I said, it is
> > > as you
> > >> >> would build code in Java 1.4 without generics. One year later you
> > > will
> > >> have
> > >> >> to overhaul your API, or somebody else will come and do it in its
> > > own
> > >> >> project. And most important: a JSR based on Java 7 will never be
> > >> accepted
> > >> >> by the EC. So stop crying for the past, go for the future (and
> > > provide
> > >> a
> > >> >> backport - should be doable in 2-3 hours for a release).
> > >> >>
> > >> >>
> > >> >>
> > >> >>> Let's face it: JDK8 is still not production ready. It is
> > > somewhat
> > >> > slower
> > >> >>> than Java7 still and I honestly know no single big project
> > > which runs
> > >> > on
> > >> >>> Java8. Not even the JavaEE7 TCK passes on Java8..
> > >> >>
> > >> >> As I said before, I know also bigger companies that probably will
> > > go to
> > >> >> Java 8 rather soon. And honestly I do not care. I wanted to build
> > > with
> > >> you
> > >> >> guys a modern API, not an outdated one ;)
> > >> >>
> > >> >>
> > >> >> Ad Optional:
> > >> >>>
> > >> >>> The discussion we had was around Optional. The only impact it
> > > has on
> > >> me
> > >> >>> now is that instead of
> > >> >>>
> > >> >>>
> > >> >>> if (blabla != null) {...}
> > >> >>>
> > >> >>> I've seen
> > >> >>>
> > >> >>> if (blabla.isPresent()) {..}
> > >> >>>
> > >> >>
> > >> >> Please read my blog as stated in one of my first mails related to
> > > the
> > >> >> topic.
> > >> >>
> > >> >> Instead of
> > >> >>
> > >> >> Optional<T> get(String)
> > >> >>
> > >> >> you get
> > >> >>
> > >> >> T get(String key);
> > >> >> T getOrDefault(String key);
> > >> >> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> > >> >>
> > >> >> Also all this must be done on your own, no fluent API for it ;(
> > >> >>
> > >> >> Most code I've seen simply don't use the ?. chain
> > > notation because
> > >> > it only
> > >> >>> works for 'navigation' use cases. Which we barely
> > > have (except
> > >> > for
> > >> >>> programmatic default values, but there are perfectly valid
> > > alternative
> > >> >>> solutions as well).
> > >> >>>
> > >> >> I think its more that many programmers still did not have really
> > > worked
> > >> >> with Java 8. For me it sounds like "the farmer only eats
> > > what he
> > >> > knows".
> > >> >> After having worked with Java 8 for some months now, I will never
> > > go
> > >> back,
> > >> >> if not necessary, really.
> > >> >>
> > >> >>
> > >> >>> Ad Functions:
> > >> >>> I've not yet seen a benefit in our current API. Actually
> > > the only
> > >> > thing we
> > >> >>> use it for currently is to replace 2 Comparator instances. I
> > > don't
> > >> > think
> > >> >>> this is something we could't do with SE7 as well ;)
> > >> >>>
> > >> >> There are several cases where it has benefits, eg the additional
> > >> property
> > >> >> function in Filter. Without Java 8 you have to create an
> > > additional
> > >> >> interface for it. MOst advantages beside the new abstraction
> > >> possibilities
> > >> >> are in the implementation. Several things are so much easier with
> > > Java
> > >> 8...
> > >> >>
> > >> >> Ad default methods in interfaces:
> > >> >>> Actually I'm not a huge fan of all those convenience
> > > functions in
> > >> > our
> > >> >>> Configuration interface anyway. It just makes it harder to
> > > read.
> > >> >>>
> > >> >> SE is different than EE. You don't have CDI that helps a lot.
> > >> > That's a
> > >> >> fact as it is. I as well wish there will be more. Perhaps we get
> > > with
> > >> >> Jigsaw some additional features, but I will not ask for going for
> > > Java
> > >> 9 as
> > >> >> a base for the API ;)
> > >> >> Harder to read is to some part also a matter of taste. When these
> > >> things
> > >> >> feel cumbersome, my personal reaction is, you should work more
> > > with
> > >> Java 8
> > >> >> and you will love that you have to write less abstract classes,
> > > you
> > >> dont
> > >> >> have to expose additional singletons for accessing things and you
> > > can
> > >> >> greatly help SPI implementors out of the API instead of providing
> > >> abstract
> > >> >> classes and create deps on your implementation...
> > >> >>
> > >> >>
> > >> >>
> > >> >>> What about adding either a branch or a module for java7?
> > >> >>>
> > >> >> Could be an option, as I always said.
> > >> >>
> > >> >>
> > >> >>
> > >> >> That way we could continue trying implement our core
> > > functionality with
> > >> >>> both. And at the end of the day we do a resume and weight up
> > > the pros
> > >> > and
> > >> >>> cons again.
> > >> >>>
> > >> >> No, go for 8 and provide 7 in parallel by the colleagues that
> > > wants it.
> > >> >> Since you state it is so important for the next decade there will
> > > be
> > >> people
> > >> >> that do the work, I assume. And don't complain if it is more
> > > work than
> > >> >> expected, because you have to write much more code because you
> > > are now
> > >> in
> > >> > 7.
> > >> >> But again, stop doing things for an outdated Java version, when
> > > you are
> > >> >> building an API for a future JSR from scratch. It is simply
> > > useless
> > >> IMO.
> > >> >>
> > >> >>
> > >> >>
> > >> >>>
> > >> >>> LieGrue,
> > >> >>> strub
> > >> >>>
> > >> >>>
> > >> >>>
> > >> >>>
> > >> >>> > On Friday, 2 January 2015, 14:02, Werner Keil
> > >> > <we...@gmail.com>
> > >> >>> wrote:
> > >> >>> > > Romain,
> > >> >>> >
> > >> >>> > That's a good point. I flagged this with e.g.
> > > JavaMoney. Given
> > >> > it aims
> > >> >>> more
> > >> >>> > at future platforms and e.g. java.util.Currency (or
> > > ICU4J) are
> > >> > already
> > >> >>> > available for Java 7 or even 6 and before, that seemed
> > > of less
> > >> > concern to
> > >> >>> > the EG or Anatole. Oracle stated, Lambdas may come to ME
> > > 8.x or 9,
> > >> > so a
> > >> >>> > theoretical ME usage of the API could work in a future
> > > version of
> > >> > Java
> > >> >>> > (ME), too.
> > >> >>> >
> > >> >>> > Here it's more about backward-compatibility, and
> > > looking at
> > >> > other Apache
> > >> >>> > projects like DeviceMap, etc. a majority requires at
> > > most Java 6
> > >> > as
> > >> >>> minimum
> > >> >>> > version today. Some may have shifted to 7, but I
> > > couldn't
> > >> > think of an
> > >> >>> > Apache project that was Java 8 minimum. CDI 2 plans to
> > > do that, so
> > >> > some
> > >> >>> > modules in DeltaSpike could eventually graduate to CDI 2
> > > and
> > >> > require
> > >> >>> Java
> > >> >>> > SE 8, but a prior version of the same projects or
> > > modules will
> > >> > still work
> > >> >>> > with CDI 1.x and Java 7.
> > >> >>> >
> > >> >>> > There are a few "functional" aspects, but if
> > > you need to
> > >> > declare a
> > >> >>> > "Functional Interface" that works in Java 7
> > > and 8 all
> > >> > you have to do
> > >> >>> > is
> > >> >>> > forget about the SE 8 annotation. It'll still work
> > > in 8 if
> > >> > declared
> > >> >>> right.
> > >> >>> > So we might have to declare some of the interfaces
> > > without the
> > >> >>> > @FunctionalInterface annotation (or comment it out for
> > > now) and
> > >> > refrain
> > >> >>> > from reusing those Java SE 8 provides. Stubbing them out
> > > with
> > >> > either
> > >> >>> config
> > >> >>> > specific or the same method names would be a solution.
> > >> >>> >
> > >> >>> > Optional was discussed in a hangout last night, and I
> > > wasn't
> > >> > under the
> > >> >>> > impression we would have to use it in places where a
> > > simple
> > >> > "null
> > >> >>> > check"
> > >> >>> > also works, so that doesn't look like a Java SE 8
> > > feature to
> > >> > be seen as
> > >> >>> > mandadory or inevitable either.
> > >> >>> >
> > >> >>> > If the API was mostly portable, then some
> > > implementations or
> > >> > modules
> > >> >>> could
> > >> >>> > be SE 8 Specific. I heard, that is somehow like Spring
> > > does it,
> > >> > too;-)
> > >> >>> >
> > >> >>> >
> > >> >>> > Werner
> > >> >>> >
> > >> >>> >
> > >> >>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > >> >>> > <rm...@gmail.com>
> > >> >>> > wrote:
> > >> >>> >
> > >> >>> >> Hi guys,
> > >> >>> >>
> > >> >>> >> I know we said java 8 is good to start a project
> > > but this is
> > >> > a blocker
> > >> >>> >> to make of tamaya built in config solution in
> > > project bound
> > >> > to java 7
> > >> >>> >> like JavaEE 7 containers for instance.
> > >> >>> >>
> > >> >>> >> Since Java 8 doesn't bring anything on
> > > implemtation point
> > >> > of view we
> > >> >>> >> mandate/cant replace by java 7 can we rethink about
> > > it?
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> Romain Manni-Bucau
> > >> >>> >> @rmannibucau
> > >> >>> >> http://www.tomitribe.com
> > >> >>> >> http://rmannibucau.wordpress.com
> > >> >>> >> https://github.com/rmannibucau
> > >> >>> >>
> > >> >>> >
> > >> >>>
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> *Anatole Tresch*
> > >> >> Java Engineer & Architect, JSR Spec Lead
> > >> >> Glärnischweg 10
> > >> >> CH - 8620 Wetzikon
> > >> >>
> > >> >> *Switzerland, Europe Zurich, GMT+1*
> > >> >> *Twitter: @atsticks*
> > >> >> *Blogs: **http://javaremarkables.blogspot.ch/
> > >> >> <http://javaremarkables.blogspot.ch/>*
> > >> >>
> > >> >> *Google: atsticksMobile +41-76 344 62 79*
> > >
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > *Anatole Tresch*
> > > Java Engineer & Architect, JSR Spec Lead
> > > Glärnischweg 10
> > > CH - 8620 Wetzikon
> > >
> > > *Switzerland, Europe Zurich, GMT+1*
> > > *Twitter: @atsticks*
> > > *Blogs: **http://javaremarkables.blogspot.ch/
> > > <http://javaremarkables.blogspot.ch/>*
> > >
> > > *Google: atsticksMobile +41-76 344 62 79*
> > >
> >
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
>
Re: java 8: really?
Posted by Anatole Tresch <at...@gmail.com>.
Hi Mark
fair enough, I am aware of that. Some of my colleagues already signed the
ICLA and are a member of the project. The others will either be, or I will
add the patch. So this should be fine so far.
I am curious how many will join after the next Hackergarten, since the
interest was quite high and we are getting a real nice and small solution
here, so probably many of them will help us improving things as well...
2015-01-06 17:28 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> > I am quite sure I will be able to provide a Java 7 backport within one
> > evening with my hackergarten colleagues...
>
> Hackergarten is always nice. But please forget that in that case we would
> need an iCLA [1] on file for each of them. Or if the change is trivial the
> respective author of each change could also add it as patch to our JIRA
> [2]. In any case you must not commit stuff to any Apache SCM which you
> didn't write yourself and we don't have any written grant [3] (thus the
> JIRA patch). For multi author work we need a grant + an IP clearance [4].
>
> This might sound like a bureaucratic burden but it is there for a good
> reason. Oracle vs Google anyone? The ASF simply doesn't like to get sued ;)
>
>
>
> LieGrue,
> strub
>
>
> [1] http://www.apache.org/licenses/icla.txt
> [2] https://issues.apache.org/jira/browse/TAMAYA
>
> [3] http://apache.org/licenses/software-grant.txt
> [4] http://incubator.apache.org/ip-clearance/ip-clearance-template.html
>
>
>
> > On Tuesday, 6 January 2015, 15:55, Anatole Tresch <at...@gmail.com>
> wrote:
> > > I can agree with that, because
> > - we focus on the API (we still are not finished)
> > - we work on the implementation
> > - we build and design for the future
> >
> > AND
> > - we provide support for Java 7, by backporting it.
> >
> > But backporting for me is crucial. By forward-porting we import all the
> > Java 7 API style, we would not want to have in a clean Java 8 solution...
> > I am quite sure I will be able to provide a Java 7 backport within one
> > evening with my hackergarten colleagues...
> >
> >
> > 2015-01-06 15:34 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >
> >> I do see the benefits of Java8 but I also do see that not many can use
> it
> >> in production in the next 2 years. Thus it will not get adopted. We
> are in
> >> a phase of transaction right now.
> >>
> >> That's the reason why I proposed to try out both of em and compare them
> >> when we are done.
> >>
> >> Let me draft this up.
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> >>
> >>
> >>
> >> > On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <
> >> rmannibucau@gmail.com> wrote:
> >> > > ok so let fork tamaya to support java 7, who will backport to
> > java 8
> >> > banch - yeah nobody will use j8 branch today?
> >> >
> >> >
> >> > Romain Manni-Bucau
> >> > @rmannibucau
> >> > http://www.tomitribe.com
> >> > http://rmannibucau.wordpress.com
> >> > https://github.com/rmannibucau
> >> >
> >> >
> >> >
> >> > 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >> >> Hi all
> >> >>
> >> >> I still think it is a real big mistake to go for Java 7. Do it in
> > 8 and
> >> >> provide a backport for 7. Not the other way round!
> >> >> Some additional remarks inline:
> >> >>
> >> >> Cheers
> >> >> Anatole
> >> >>
> >> >>
> >> >> 2015-01-06 14:26 GMT+01:00 Mark Struberg
> > <st...@yahoo.de>:
> >> >>
> >> >>> I'm also still not convinced.
> >> >>>
> >> >>> Let's step back a few meters and simply compare the
> > benefits vs the
> >> >>> downsides
> >> >>>
> >> >>>
> >> >>> - PRO
> >> >>> * more 'modern'
> >> >>> * Optional
> >> >>> * Functions
> >> >>> * default methods in interfaces
> >> >>>
> >> >> + Streams
> >> >> + extended functions on collections
> >> >> + date time API
> >> >> + concurrent improvements
> >> >>
> >> >>
> >> >>
> >> >>> - CON
> >> >>> * not backward compatible
> >> >>> * blocks adoption in current containers
> >> >>>
> >> >> -> no. the EE7 TCK is not running on Java 7, but the
> > containers do!
> >> Even
> >> >> bigger companies like Credit Suisse are thinking on replacing the
> > JDK
> >> >> during next year.
> >> >>
> >> >>
> >> >>
> >> >>> * blocks adoption in many user projects
> >> >>>
> >> >> But as well is a prop compared to other libraries existing and
> > will for
> >> >> sure boost support by other well known JUGs such as SouJava and
> > LJC..
> >> >>
> >> >>
> >> >>
> >> >>> * we actually don't really need any of it's features
> >> >>>
> >> >> Of course, you can build things without it. But as I said, it is
> > as you
> >> >> would build code in Java 1.4 without generics. One year later you
> > will
> >> have
> >> >> to overhaul your API, or somebody else will come and do it in its
> > own
> >> >> project. And most important: a JSR based on Java 7 will never be
> >> accepted
> >> >> by the EC. So stop crying for the past, go for the future (and
> > provide
> >> a
> >> >> backport - should be doable in 2-3 hours for a release).
> >> >>
> >> >>
> >> >>
> >> >>> Let's face it: JDK8 is still not production ready. It is
> > somewhat
> >> > slower
> >> >>> than Java7 still and I honestly know no single big project
> > which runs
> >> > on
> >> >>> Java8. Not even the JavaEE7 TCK passes on Java8..
> >> >>
> >> >> As I said before, I know also bigger companies that probably will
> > go to
> >> >> Java 8 rather soon. And honestly I do not care. I wanted to build
> > with
> >> you
> >> >> guys a modern API, not an outdated one ;)
> >> >>
> >> >>
> >> >> Ad Optional:
> >> >>>
> >> >>> The discussion we had was around Optional. The only impact it
> > has on
> >> me
> >> >>> now is that instead of
> >> >>>
> >> >>>
> >> >>> if (blabla != null) {...}
> >> >>>
> >> >>> I've seen
> >> >>>
> >> >>> if (blabla.isPresent()) {..}
> >> >>>
> >> >>
> >> >> Please read my blog as stated in one of my first mails related to
> > the
> >> >> topic.
> >> >>
> >> >> Instead of
> >> >>
> >> >> Optional<T> get(String)
> >> >>
> >> >> you get
> >> >>
> >> >> T get(String key);
> >> >> T getOrDefault(String key);
> >> >> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> >> >>
> >> >> Also all this must be done on your own, no fluent API for it ;(
> >> >>
> >> >> Most code I've seen simply don't use the ?. chain
> > notation because
> >> > it only
> >> >>> works for 'navigation' use cases. Which we barely
> > have (except
> >> > for
> >> >>> programmatic default values, but there are perfectly valid
> > alternative
> >> >>> solutions as well).
> >> >>>
> >> >> I think its more that many programmers still did not have really
> > worked
> >> >> with Java 8. For me it sounds like "the farmer only eats
> > what he
> >> > knows".
> >> >> After having worked with Java 8 for some months now, I will never
> > go
> >> back,
> >> >> if not necessary, really.
> >> >>
> >> >>
> >> >>> Ad Functions:
> >> >>> I've not yet seen a benefit in our current API. Actually
> > the only
> >> > thing we
> >> >>> use it for currently is to replace 2 Comparator instances. I
> > don't
> >> > think
> >> >>> this is something we could't do with SE7 as well ;)
> >> >>>
> >> >> There are several cases where it has benefits, eg the additional
> >> property
> >> >> function in Filter. Without Java 8 you have to create an
> > additional
> >> >> interface for it. MOst advantages beside the new abstraction
> >> possibilities
> >> >> are in the implementation. Several things are so much easier with
> > Java
> >> 8...
> >> >>
> >> >> Ad default methods in interfaces:
> >> >>> Actually I'm not a huge fan of all those convenience
> > functions in
> >> > our
> >> >>> Configuration interface anyway. It just makes it harder to
> > read.
> >> >>>
> >> >> SE is different than EE. You don't have CDI that helps a lot.
> >> > That's a
> >> >> fact as it is. I as well wish there will be more. Perhaps we get
> > with
> >> >> Jigsaw some additional features, but I will not ask for going for
> > Java
> >> 9 as
> >> >> a base for the API ;)
> >> >> Harder to read is to some part also a matter of taste. When these
> >> things
> >> >> feel cumbersome, my personal reaction is, you should work more
> > with
> >> Java 8
> >> >> and you will love that you have to write less abstract classes,
> > you
> >> dont
> >> >> have to expose additional singletons for accessing things and you
> > can
> >> >> greatly help SPI implementors out of the API instead of providing
> >> abstract
> >> >> classes and create deps on your implementation...
> >> >>
> >> >>
> >> >>
> >> >>> What about adding either a branch or a module for java7?
> >> >>>
> >> >> Could be an option, as I always said.
> >> >>
> >> >>
> >> >>
> >> >> That way we could continue trying implement our core
> > functionality with
> >> >>> both. And at the end of the day we do a resume and weight up
> > the pros
> >> > and
> >> >>> cons again.
> >> >>>
> >> >> No, go for 8 and provide 7 in parallel by the colleagues that
> > wants it.
> >> >> Since you state it is so important for the next decade there will
> > be
> >> people
> >> >> that do the work, I assume. And don't complain if it is more
> > work than
> >> >> expected, because you have to write much more code because you
> > are now
> >> in
> >> > 7.
> >> >> But again, stop doing things for an outdated Java version, when
> > you are
> >> >> building an API for a future JSR from scratch. It is simply
> > useless
> >> IMO.
> >> >>
> >> >>
> >> >>
> >> >>>
> >> >>> LieGrue,
> >> >>> strub
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> > On Friday, 2 January 2015, 14:02, Werner Keil
> >> > <we...@gmail.com>
> >> >>> wrote:
> >> >>> > > Romain,
> >> >>> >
> >> >>> > That's a good point. I flagged this with e.g.
> > JavaMoney. Given
> >> > it aims
> >> >>> more
> >> >>> > at future platforms and e.g. java.util.Currency (or
> > ICU4J) are
> >> > already
> >> >>> > available for Java 7 or even 6 and before, that seemed
> > of less
> >> > concern to
> >> >>> > the EG or Anatole. Oracle stated, Lambdas may come to ME
> > 8.x or 9,
> >> > so a
> >> >>> > theoretical ME usage of the API could work in a future
> > version of
> >> > Java
> >> >>> > (ME), too.
> >> >>> >
> >> >>> > Here it's more about backward-compatibility, and
> > looking at
> >> > other Apache
> >> >>> > projects like DeviceMap, etc. a majority requires at
> > most Java 6
> >> > as
> >> >>> minimum
> >> >>> > version today. Some may have shifted to 7, but I
> > couldn't
> >> > think of an
> >> >>> > Apache project that was Java 8 minimum. CDI 2 plans to
> > do that, so
> >> > some
> >> >>> > modules in DeltaSpike could eventually graduate to CDI 2
> > and
> >> > require
> >> >>> Java
> >> >>> > SE 8, but a prior version of the same projects or
> > modules will
> >> > still work
> >> >>> > with CDI 1.x and Java 7.
> >> >>> >
> >> >>> > There are a few "functional" aspects, but if
> > you need to
> >> > declare a
> >> >>> > "Functional Interface" that works in Java 7
> > and 8 all
> >> > you have to do
> >> >>> > is
> >> >>> > forget about the SE 8 annotation. It'll still work
> > in 8 if
> >> > declared
> >> >>> right.
> >> >>> > So we might have to declare some of the interfaces
> > without the
> >> >>> > @FunctionalInterface annotation (or comment it out for
> > now) and
> >> > refrain
> >> >>> > from reusing those Java SE 8 provides. Stubbing them out
> > with
> >> > either
> >> >>> config
> >> >>> > specific or the same method names would be a solution.
> >> >>> >
> >> >>> > Optional was discussed in a hangout last night, and I
> > wasn't
> >> > under the
> >> >>> > impression we would have to use it in places where a
> > simple
> >> > "null
> >> >>> > check"
> >> >>> > also works, so that doesn't look like a Java SE 8
> > feature to
> >> > be seen as
> >> >>> > mandadory or inevitable either.
> >> >>> >
> >> >>> > If the API was mostly portable, then some
> > implementations or
> >> > modules
> >> >>> could
> >> >>> > be SE 8 Specific. I heard, that is somehow like Spring
> > does it,
> >> > too;-)
> >> >>> >
> >> >>> >
> >> >>> > Werner
> >> >>> >
> >> >>> >
> >> >>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> >> >>> > <rm...@gmail.com>
> >> >>> > wrote:
> >> >>> >
> >> >>> >> Hi guys,
> >> >>> >>
> >> >>> >> I know we said java 8 is good to start a project
> > but this is
> >> > a blocker
> >> >>> >> to make of tamaya built in config solution in
> > project bound
> >> > to java 7
> >> >>> >> like JavaEE 7 containers for instance.
> >> >>> >>
> >> >>> >> Since Java 8 doesn't bring anything on
> > implemtation point
> >> > of view we
> >> >>> >> mandate/cant replace by java 7 can we rethink about
> > it?
> >> >>> >>
> >> >>> >>
> >> >>> >> Romain Manni-Bucau
> >> >>> >> @rmannibucau
> >> >>> >> http://www.tomitribe.com
> >> >>> >> http://rmannibucau.wordpress.com
> >> >>> >> https://github.com/rmannibucau
> >> >>> >>
> >> >>> >
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> *Anatole Tresch*
> >> >> Java Engineer & Architect, JSR Spec Lead
> >> >> Glärnischweg 10
> >> >> CH - 8620 Wetzikon
> >> >>
> >> >> *Switzerland, Europe Zurich, GMT+1*
> >> >> *Twitter: @atsticks*
> >> >> *Blogs: **http://javaremarkables.blogspot.ch/
> >> >> <http://javaremarkables.blogspot.ch/>*
> >> >>
> >> >> *Google: atsticksMobile +41-76 344 62 79*
> >
> >> >
> >>
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
> >
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
> I am quite sure I will be able to provide a Java 7 backport within one
> evening with my hackergarten colleagues...
Hackergarten is always nice. But please forget that in that case we would need an iCLA [1] on file for each of them. Or if the change is trivial the respective author of each change could also add it as patch to our JIRA [2]. In any case you must not commit stuff to any Apache SCM which you didn't write yourself and we don't have any written grant [3] (thus the JIRA patch). For multi author work we need a grant + an IP clearance [4].
This might sound like a bureaucratic burden but it is there for a good reason. Oracle vs Google anyone? The ASF simply doesn't like to get sued ;)
LieGrue,
strub
[1] http://www.apache.org/licenses/icla.txt
[2] https://issues.apache.org/jira/browse/TAMAYA
[3] http://apache.org/licenses/software-grant.txt
[4] http://incubator.apache.org/ip-clearance/ip-clearance-template.html
> On Tuesday, 6 January 2015, 15:55, Anatole Tresch <at...@gmail.com> wrote:
> > I can agree with that, because
> - we focus on the API (we still are not finished)
> - we work on the implementation
> - we build and design for the future
>
> AND
> - we provide support for Java 7, by backporting it.
>
> But backporting for me is crucial. By forward-porting we import all the
> Java 7 API style, we would not want to have in a clean Java 8 solution...
> I am quite sure I will be able to provide a Java 7 backport within one
> evening with my hackergarten colleagues...
>
>
> 2015-01-06 15:34 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>
>> I do see the benefits of Java8 but I also do see that not many can use it
>> in production in the next 2 years. Thus it will not get adopted. We are in
>> a phase of transaction right now.
>>
>> That's the reason why I proposed to try out both of em and compare them
>> when we are done.
>>
>> Let me draft this up.
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>>
>> > On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <
>> rmannibucau@gmail.com> wrote:
>> > > ok so let fork tamaya to support java 7, who will backport to
> java 8
>> > banch - yeah nobody will use j8 branch today?
>> >
>> >
>> > Romain Manni-Bucau
>> > @rmannibucau
>> > http://www.tomitribe.com
>> > http://rmannibucau.wordpress.com
>> > https://github.com/rmannibucau
>> >
>> >
>> >
>> > 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> >> Hi all
>> >>
>> >> I still think it is a real big mistake to go for Java 7. Do it in
> 8 and
>> >> provide a backport for 7. Not the other way round!
>> >> Some additional remarks inline:
>> >>
>> >> Cheers
>> >> Anatole
>> >>
>> >>
>> >> 2015-01-06 14:26 GMT+01:00 Mark Struberg
> <st...@yahoo.de>:
>> >>
>> >>> I'm also still not convinced.
>> >>>
>> >>> Let's step back a few meters and simply compare the
> benefits vs the
>> >>> downsides
>> >>>
>> >>>
>> >>> - PRO
>> >>> * more 'modern'
>> >>> * Optional
>> >>> * Functions
>> >>> * default methods in interfaces
>> >>>
>> >> + Streams
>> >> + extended functions on collections
>> >> + date time API
>> >> + concurrent improvements
>> >>
>> >>
>> >>
>> >>> - CON
>> >>> * not backward compatible
>> >>> * blocks adoption in current containers
>> >>>
>> >> -> no. the EE7 TCK is not running on Java 7, but the
> containers do!
>> Even
>> >> bigger companies like Credit Suisse are thinking on replacing the
> JDK
>> >> during next year.
>> >>
>> >>
>> >>
>> >>> * blocks adoption in many user projects
>> >>>
>> >> But as well is a prop compared to other libraries existing and
> will for
>> >> sure boost support by other well known JUGs such as SouJava and
> LJC..
>> >>
>> >>
>> >>
>> >>> * we actually don't really need any of it's features
>> >>>
>> >> Of course, you can build things without it. But as I said, it is
> as you
>> >> would build code in Java 1.4 without generics. One year later you
> will
>> have
>> >> to overhaul your API, or somebody else will come and do it in its
> own
>> >> project. And most important: a JSR based on Java 7 will never be
>> accepted
>> >> by the EC. So stop crying for the past, go for the future (and
> provide
>> a
>> >> backport - should be doable in 2-3 hours for a release).
>> >>
>> >>
>> >>
>> >>> Let's face it: JDK8 is still not production ready. It is
> somewhat
>> > slower
>> >>> than Java7 still and I honestly know no single big project
> which runs
>> > on
>> >>> Java8. Not even the JavaEE7 TCK passes on Java8..
>> >>
>> >> As I said before, I know also bigger companies that probably will
> go to
>> >> Java 8 rather soon. And honestly I do not care. I wanted to build
> with
>> you
>> >> guys a modern API, not an outdated one ;)
>> >>
>> >>
>> >> Ad Optional:
>> >>>
>> >>> The discussion we had was around Optional. The only impact it
> has on
>> me
>> >>> now is that instead of
>> >>>
>> >>>
>> >>> if (blabla != null) {...}
>> >>>
>> >>> I've seen
>> >>>
>> >>> if (blabla.isPresent()) {..}
>> >>>
>> >>
>> >> Please read my blog as stated in one of my first mails related to
> the
>> >> topic.
>> >>
>> >> Instead of
>> >>
>> >> Optional<T> get(String)
>> >>
>> >> you get
>> >>
>> >> T get(String key);
>> >> T getOrDefault(String key);
>> >> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>> >>
>> >> Also all this must be done on your own, no fluent API for it ;(
>> >>
>> >> Most code I've seen simply don't use the ?. chain
> notation because
>> > it only
>> >>> works for 'navigation' use cases. Which we barely
> have (except
>> > for
>> >>> programmatic default values, but there are perfectly valid
> alternative
>> >>> solutions as well).
>> >>>
>> >> I think its more that many programmers still did not have really
> worked
>> >> with Java 8. For me it sounds like "the farmer only eats
> what he
>> > knows".
>> >> After having worked with Java 8 for some months now, I will never
> go
>> back,
>> >> if not necessary, really.
>> >>
>> >>
>> >>> Ad Functions:
>> >>> I've not yet seen a benefit in our current API. Actually
> the only
>> > thing we
>> >>> use it for currently is to replace 2 Comparator instances. I
> don't
>> > think
>> >>> this is something we could't do with SE7 as well ;)
>> >>>
>> >> There are several cases where it has benefits, eg the additional
>> property
>> >> function in Filter. Without Java 8 you have to create an
> additional
>> >> interface for it. MOst advantages beside the new abstraction
>> possibilities
>> >> are in the implementation. Several things are so much easier with
> Java
>> 8...
>> >>
>> >> Ad default methods in interfaces:
>> >>> Actually I'm not a huge fan of all those convenience
> functions in
>> > our
>> >>> Configuration interface anyway. It just makes it harder to
> read.
>> >>>
>> >> SE is different than EE. You don't have CDI that helps a lot.
>> > That's a
>> >> fact as it is. I as well wish there will be more. Perhaps we get
> with
>> >> Jigsaw some additional features, but I will not ask for going for
> Java
>> 9 as
>> >> a base for the API ;)
>> >> Harder to read is to some part also a matter of taste. When these
>> things
>> >> feel cumbersome, my personal reaction is, you should work more
> with
>> Java 8
>> >> and you will love that you have to write less abstract classes,
> you
>> dont
>> >> have to expose additional singletons for accessing things and you
> can
>> >> greatly help SPI implementors out of the API instead of providing
>> abstract
>> >> classes and create deps on your implementation...
>> >>
>> >>
>> >>
>> >>> What about adding either a branch or a module for java7?
>> >>>
>> >> Could be an option, as I always said.
>> >>
>> >>
>> >>
>> >> That way we could continue trying implement our core
> functionality with
>> >>> both. And at the end of the day we do a resume and weight up
> the pros
>> > and
>> >>> cons again.
>> >>>
>> >> No, go for 8 and provide 7 in parallel by the colleagues that
> wants it.
>> >> Since you state it is so important for the next decade there will
> be
>> people
>> >> that do the work, I assume. And don't complain if it is more
> work than
>> >> expected, because you have to write much more code because you
> are now
>> in
>> > 7.
>> >> But again, stop doing things for an outdated Java version, when
> you are
>> >> building an API for a future JSR from scratch. It is simply
> useless
>> IMO.
>> >>
>> >>
>> >>
>> >>>
>> >>> LieGrue,
>> >>> strub
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> > On Friday, 2 January 2015, 14:02, Werner Keil
>> > <we...@gmail.com>
>> >>> wrote:
>> >>> > > Romain,
>> >>> >
>> >>> > That's a good point. I flagged this with e.g.
> JavaMoney. Given
>> > it aims
>> >>> more
>> >>> > at future platforms and e.g. java.util.Currency (or
> ICU4J) are
>> > already
>> >>> > available for Java 7 or even 6 and before, that seemed
> of less
>> > concern to
>> >>> > the EG or Anatole. Oracle stated, Lambdas may come to ME
> 8.x or 9,
>> > so a
>> >>> > theoretical ME usage of the API could work in a future
> version of
>> > Java
>> >>> > (ME), too.
>> >>> >
>> >>> > Here it's more about backward-compatibility, and
> looking at
>> > other Apache
>> >>> > projects like DeviceMap, etc. a majority requires at
> most Java 6
>> > as
>> >>> minimum
>> >>> > version today. Some may have shifted to 7, but I
> couldn't
>> > think of an
>> >>> > Apache project that was Java 8 minimum. CDI 2 plans to
> do that, so
>> > some
>> >>> > modules in DeltaSpike could eventually graduate to CDI 2
> and
>> > require
>> >>> Java
>> >>> > SE 8, but a prior version of the same projects or
> modules will
>> > still work
>> >>> > with CDI 1.x and Java 7.
>> >>> >
>> >>> > There are a few "functional" aspects, but if
> you need to
>> > declare a
>> >>> > "Functional Interface" that works in Java 7
> and 8 all
>> > you have to do
>> >>> > is
>> >>> > forget about the SE 8 annotation. It'll still work
> in 8 if
>> > declared
>> >>> right.
>> >>> > So we might have to declare some of the interfaces
> without the
>> >>> > @FunctionalInterface annotation (or comment it out for
> now) and
>> > refrain
>> >>> > from reusing those Java SE 8 provides. Stubbing them out
> with
>> > either
>> >>> config
>> >>> > specific or the same method names would be a solution.
>> >>> >
>> >>> > Optional was discussed in a hangout last night, and I
> wasn't
>> > under the
>> >>> > impression we would have to use it in places where a
> simple
>> > "null
>> >>> > check"
>> >>> > also works, so that doesn't look like a Java SE 8
> feature to
>> > be seen as
>> >>> > mandadory or inevitable either.
>> >>> >
>> >>> > If the API was mostly portable, then some
> implementations or
>> > modules
>> >>> could
>> >>> > be SE 8 Specific. I heard, that is somehow like Spring
> does it,
>> > too;-)
>> >>> >
>> >>> >
>> >>> > Werner
>> >>> >
>> >>> >
>> >>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>> >>> > <rm...@gmail.com>
>> >>> > wrote:
>> >>> >
>> >>> >> Hi guys,
>> >>> >>
>> >>> >> I know we said java 8 is good to start a project
> but this is
>> > a blocker
>> >>> >> to make of tamaya built in config solution in
> project bound
>> > to java 7
>> >>> >> like JavaEE 7 containers for instance.
>> >>> >>
>> >>> >> Since Java 8 doesn't bring anything on
> implemtation point
>> > of view we
>> >>> >> mandate/cant replace by java 7 can we rethink about
> it?
>> >>> >>
>> >>> >>
>> >>> >> Romain Manni-Bucau
>> >>> >> @rmannibucau
>> >>> >> http://www.tomitribe.com
>> >>> >> http://rmannibucau.wordpress.com
>> >>> >> https://github.com/rmannibucau
>> >>> >>
>> >>> >
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> *Anatole Tresch*
>> >> Java Engineer & Architect, JSR Spec Lead
>> >> Glärnischweg 10
>> >> CH - 8620 Wetzikon
>> >>
>> >> *Switzerland, Europe Zurich, GMT+1*
>> >> *Twitter: @atsticks*
>> >> *Blogs: **http://javaremarkables.blogspot.ch/
>> >> <http://javaremarkables.blogspot.ch/>*
>> >>
>> >> *Google: atsticksMobile +41-76 344 62 79*
>
>> >
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
>
Re: java 8: really?
Posted by Anatole Tresch <at...@gmail.com>.
I can agree with that, because
- we focus on the API (we still are not finished)
- we work on the implementation
- we build and design for the future
AND
- we provide support for Java 7, by backporting it.
But backporting for me is crucial. By forward-porting we import all the
Java 7 API style, we would not want to have in a clean Java 8 solution...
I am quite sure I will be able to provide a Java 7 backport within one
evening with my hackergarten colleagues...
2015-01-06 15:34 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> I do see the benefits of Java8 but I also do see that not many can use it
> in production in the next 2 years. Thus it will not get adopted. We are in
> a phase of transaction right now.
>
> That's the reason why I proposed to try out both of em and compare them
> when we are done.
>
> Let me draft this up.
>
> LieGrue,
> strub
>
>
>
>
>
> > On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <
> rmannibucau@gmail.com> wrote:
> > > ok so let fork tamaya to support java 7, who will backport to java 8
> > banch - yeah nobody will use j8 branch today?
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau
> > http://www.tomitribe.com
> > http://rmannibucau.wordpress.com
> > https://github.com/rmannibucau
> >
> >
> >
> > 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >> Hi all
> >>
> >> I still think it is a real big mistake to go for Java 7. Do it in 8 and
> >> provide a backport for 7. Not the other way round!
> >> Some additional remarks inline:
> >>
> >> Cheers
> >> Anatole
> >>
> >>
> >> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >>
> >>> I'm also still not convinced.
> >>>
> >>> Let's step back a few meters and simply compare the benefits vs the
> >>> downsides
> >>>
> >>>
> >>> - PRO
> >>> * more 'modern'
> >>> * Optional
> >>> * Functions
> >>> * default methods in interfaces
> >>>
> >> + Streams
> >> + extended functions on collections
> >> + date time API
> >> + concurrent improvements
> >>
> >>
> >>
> >>> - CON
> >>> * not backward compatible
> >>> * blocks adoption in current containers
> >>>
> >> -> no. the EE7 TCK is not running on Java 7, but the containers do!
> Even
> >> bigger companies like Credit Suisse are thinking on replacing the JDK
> >> during next year.
> >>
> >>
> >>
> >>> * blocks adoption in many user projects
> >>>
> >> But as well is a prop compared to other libraries existing and will for
> >> sure boost support by other well known JUGs such as SouJava and LJC..
> >>
> >>
> >>
> >>> * we actually don't really need any of it's features
> >>>
> >> Of course, you can build things without it. But as I said, it is as you
> >> would build code in Java 1.4 without generics. One year later you will
> have
> >> to overhaul your API, or somebody else will come and do it in its own
> >> project. And most important: a JSR based on Java 7 will never be
> accepted
> >> by the EC. So stop crying for the past, go for the future (and provide
> a
> >> backport - should be doable in 2-3 hours for a release).
> >>
> >>
> >>
> >>> Let's face it: JDK8 is still not production ready. It is somewhat
> > slower
> >>> than Java7 still and I honestly know no single big project which runs
> > on
> >>> Java8. Not even the JavaEE7 TCK passes on Java8..
> >>
> >> As I said before, I know also bigger companies that probably will go to
> >> Java 8 rather soon. And honestly I do not care. I wanted to build with
> you
> >> guys a modern API, not an outdated one ;)
> >>
> >>
> >> Ad Optional:
> >>>
> >>> The discussion we had was around Optional. The only impact it has on
> me
> >>> now is that instead of
> >>>
> >>>
> >>> if (blabla != null) {...}
> >>>
> >>> I've seen
> >>>
> >>> if (blabla.isPresent()) {..}
> >>>
> >>
> >> Please read my blog as stated in one of my first mails related to the
> >> topic.
> >>
> >> Instead of
> >>
> >> Optional<T> get(String)
> >>
> >> you get
> >>
> >> T get(String key);
> >> T getOrDefault(String key);
> >> T getOrThrow(String key, ExceptionFactory<T>) throws T;
> >>
> >> Also all this must be done on your own, no fluent API for it ;(
> >>
> >> Most code I've seen simply don't use the ?. chain notation because
> > it only
> >>> works for 'navigation' use cases. Which we barely have (except
> > for
> >>> programmatic default values, but there are perfectly valid alternative
> >>> solutions as well).
> >>>
> >> I think its more that many programmers still did not have really worked
> >> with Java 8. For me it sounds like "the farmer only eats what he
> > knows".
> >> After having worked with Java 8 for some months now, I will never go
> back,
> >> if not necessary, really.
> >>
> >>
> >>> Ad Functions:
> >>> I've not yet seen a benefit in our current API. Actually the only
> > thing we
> >>> use it for currently is to replace 2 Comparator instances. I don't
> > think
> >>> this is something we could't do with SE7 as well ;)
> >>>
> >> There are several cases where it has benefits, eg the additional
> property
> >> function in Filter. Without Java 8 you have to create an additional
> >> interface for it. MOst advantages beside the new abstraction
> possibilities
> >> are in the implementation. Several things are so much easier with Java
> 8...
> >>
> >> Ad default methods in interfaces:
> >>> Actually I'm not a huge fan of all those convenience functions in
> > our
> >>> Configuration interface anyway. It just makes it harder to read.
> >>>
> >> SE is different than EE. You don't have CDI that helps a lot.
> > That's a
> >> fact as it is. I as well wish there will be more. Perhaps we get with
> >> Jigsaw some additional features, but I will not ask for going for Java
> 9 as
> >> a base for the API ;)
> >> Harder to read is to some part also a matter of taste. When these
> things
> >> feel cumbersome, my personal reaction is, you should work more with
> Java 8
> >> and you will love that you have to write less abstract classes, you
> dont
> >> have to expose additional singletons for accessing things and you can
> >> greatly help SPI implementors out of the API instead of providing
> abstract
> >> classes and create deps on your implementation...
> >>
> >>
> >>
> >>> What about adding either a branch or a module for java7?
> >>>
> >> Could be an option, as I always said.
> >>
> >>
> >>
> >> That way we could continue trying implement our core functionality with
> >>> both. And at the end of the day we do a resume and weight up the pros
> > and
> >>> cons again.
> >>>
> >> No, go for 8 and provide 7 in parallel by the colleagues that wants it.
> >> Since you state it is so important for the next decade there will be
> people
> >> that do the work, I assume. And don't complain if it is more work than
> >> expected, because you have to write much more code because you are now
> in
> > 7.
> >> But again, stop doing things for an outdated Java version, when you are
> >> building an API for a future JSR from scratch. It is simply useless
> IMO.
> >>
> >>
> >>
> >>>
> >>> LieGrue,
> >>> strub
> >>>
> >>>
> >>>
> >>>
> >>> > On Friday, 2 January 2015, 14:02, Werner Keil
> > <we...@gmail.com>
> >>> wrote:
> >>> > > Romain,
> >>> >
> >>> > That's a good point. I flagged this with e.g. JavaMoney. Given
> > it aims
> >>> more
> >>> > at future platforms and e.g. java.util.Currency (or ICU4J) are
> > already
> >>> > available for Java 7 or even 6 and before, that seemed of less
> > concern to
> >>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9,
> > so a
> >>> > theoretical ME usage of the API could work in a future version of
> > Java
> >>> > (ME), too.
> >>> >
> >>> > Here it's more about backward-compatibility, and looking at
> > other Apache
> >>> > projects like DeviceMap, etc. a majority requires at most Java 6
> > as
> >>> minimum
> >>> > version today. Some may have shifted to 7, but I couldn't
> > think of an
> >>> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so
> > some
> >>> > modules in DeltaSpike could eventually graduate to CDI 2 and
> > require
> >>> Java
> >>> > SE 8, but a prior version of the same projects or modules will
> > still work
> >>> > with CDI 1.x and Java 7.
> >>> >
> >>> > There are a few "functional" aspects, but if you need to
> > declare a
> >>> > "Functional Interface" that works in Java 7 and 8 all
> > you have to do
> >>> > is
> >>> > forget about the SE 8 annotation. It'll still work in 8 if
> > declared
> >>> right.
> >>> > So we might have to declare some of the interfaces without the
> >>> > @FunctionalInterface annotation (or comment it out for now) and
> > refrain
> >>> > from reusing those Java SE 8 provides. Stubbing them out with
> > either
> >>> config
> >>> > specific or the same method names would be a solution.
> >>> >
> >>> > Optional was discussed in a hangout last night, and I wasn't
> > under the
> >>> > impression we would have to use it in places where a simple
> > "null
> >>> > check"
> >>> > also works, so that doesn't look like a Java SE 8 feature to
> > be seen as
> >>> > mandadory or inevitable either.
> >>> >
> >>> > If the API was mostly portable, then some implementations or
> > modules
> >>> could
> >>> > be SE 8 Specific. I heard, that is somehow like Spring does it,
> > too;-)
> >>> >
> >>> >
> >>> > Werner
> >>> >
> >>> >
> >>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> >>> > <rm...@gmail.com>
> >>> > wrote:
> >>> >
> >>> >> Hi guys,
> >>> >>
> >>> >> I know we said java 8 is good to start a project but this is
> > a blocker
> >>> >> to make of tamaya built in config solution in project bound
> > to java 7
> >>> >> like JavaEE 7 containers for instance.
> >>> >>
> >>> >> Since Java 8 doesn't bring anything on implemtation point
> > of view we
> >>> >> mandate/cant replace by java 7 can we rethink about it?
> >>> >>
> >>> >>
> >>> >> Romain Manni-Bucau
> >>> >> @rmannibucau
> >>> >> http://www.tomitribe.com
> >>> >> http://rmannibucau.wordpress.com
> >>> >> https://github.com/rmannibucau
> >>> >>
> >>> >
> >>>
> >>
> >>
> >>
> >> --
> >> *Anatole Tresch*
> >> Java Engineer & Architect, JSR Spec Lead
> >> Glärnischweg 10
> >> CH - 8620 Wetzikon
> >>
> >> *Switzerland, Europe Zurich, GMT+1*
> >> *Twitter: @atsticks*
> >> *Blogs: **http://javaremarkables.blogspot.ch/
> >> <http://javaremarkables.blogspot.ch/>*
> >>
> >> *Google: atsticksMobile +41-76 344 62 79*
> >
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
I do see the benefits of Java8 but I also do see that not many can use it in production in the next 2 years. Thus it will not get adopted. We are in a phase of transaction right now.
That's the reason why I proposed to try out both of em and compare them when we are done.
Let me draft this up.
LieGrue,
strub
> On Tuesday, 6 January 2015, 15:23, Romain Manni-Bucau <rm...@gmail.com> wrote:
> > ok so let fork tamaya to support java 7, who will backport to java 8
> banch - yeah nobody will use j8 branch today?
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
>
> 2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> Hi all
>>
>> I still think it is a real big mistake to go for Java 7. Do it in 8 and
>> provide a backport for 7. Not the other way round!
>> Some additional remarks inline:
>>
>> Cheers
>> Anatole
>>
>>
>> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>>
>>> I'm also still not convinced.
>>>
>>> Let's step back a few meters and simply compare the benefits vs the
>>> downsides
>>>
>>>
>>> - PRO
>>> * more 'modern'
>>> * Optional
>>> * Functions
>>> * default methods in interfaces
>>>
>> + Streams
>> + extended functions on collections
>> + date time API
>> + concurrent improvements
>>
>>
>>
>>> - CON
>>> * not backward compatible
>>> * blocks adoption in current containers
>>>
>> -> no. the EE7 TCK is not running on Java 7, but the containers do! Even
>> bigger companies like Credit Suisse are thinking on replacing the JDK
>> during next year.
>>
>>
>>
>>> * blocks adoption in many user projects
>>>
>> But as well is a prop compared to other libraries existing and will for
>> sure boost support by other well known JUGs such as SouJava and LJC..
>>
>>
>>
>>> * we actually don't really need any of it's features
>>>
>> Of course, you can build things without it. But as I said, it is as you
>> would build code in Java 1.4 without generics. One year later you will have
>> to overhaul your API, or somebody else will come and do it in its own
>> project. And most important: a JSR based on Java 7 will never be accepted
>> by the EC. So stop crying for the past, go for the future (and provide a
>> backport - should be doable in 2-3 hours for a release).
>>
>>
>>
>>> Let's face it: JDK8 is still not production ready. It is somewhat
> slower
>>> than Java7 still and I honestly know no single big project which runs
> on
>>> Java8. Not even the JavaEE7 TCK passes on Java8..
>>
>> As I said before, I know also bigger companies that probably will go to
>> Java 8 rather soon. And honestly I do not care. I wanted to build with you
>> guys a modern API, not an outdated one ;)
>>
>>
>> Ad Optional:
>>>
>>> The discussion we had was around Optional. The only impact it has on me
>>> now is that instead of
>>>
>>>
>>> if (blabla != null) {...}
>>>
>>> I've seen
>>>
>>> if (blabla.isPresent()) {..}
>>>
>>
>> Please read my blog as stated in one of my first mails related to the
>> topic.
>>
>> Instead of
>>
>> Optional<T> get(String)
>>
>> you get
>>
>> T get(String key);
>> T getOrDefault(String key);
>> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>>
>> Also all this must be done on your own, no fluent API for it ;(
>>
>> Most code I've seen simply don't use the ?. chain notation because
> it only
>>> works for 'navigation' use cases. Which we barely have (except
> for
>>> programmatic default values, but there are perfectly valid alternative
>>> solutions as well).
>>>
>> I think its more that many programmers still did not have really worked
>> with Java 8. For me it sounds like "the farmer only eats what he
> knows".
>> After having worked with Java 8 for some months now, I will never go back,
>> if not necessary, really.
>>
>>
>>> Ad Functions:
>>> I've not yet seen a benefit in our current API. Actually the only
> thing we
>>> use it for currently is to replace 2 Comparator instances. I don't
> think
>>> this is something we could't do with SE7 as well ;)
>>>
>> There are several cases where it has benefits, eg the additional property
>> function in Filter. Without Java 8 you have to create an additional
>> interface for it. MOst advantages beside the new abstraction possibilities
>> are in the implementation. Several things are so much easier with Java 8...
>>
>> Ad default methods in interfaces:
>>> Actually I'm not a huge fan of all those convenience functions in
> our
>>> Configuration interface anyway. It just makes it harder to read.
>>>
>> SE is different than EE. You don't have CDI that helps a lot.
> That's a
>> fact as it is. I as well wish there will be more. Perhaps we get with
>> Jigsaw some additional features, but I will not ask for going for Java 9 as
>> a base for the API ;)
>> Harder to read is to some part also a matter of taste. When these things
>> feel cumbersome, my personal reaction is, you should work more with Java 8
>> and you will love that you have to write less abstract classes, you dont
>> have to expose additional singletons for accessing things and you can
>> greatly help SPI implementors out of the API instead of providing abstract
>> classes and create deps on your implementation...
>>
>>
>>
>>> What about adding either a branch or a module for java7?
>>>
>> Could be an option, as I always said.
>>
>>
>>
>> That way we could continue trying implement our core functionality with
>>> both. And at the end of the day we do a resume and weight up the pros
> and
>>> cons again.
>>>
>> No, go for 8 and provide 7 in parallel by the colleagues that wants it.
>> Since you state it is so important for the next decade there will be people
>> that do the work, I assume. And don't complain if it is more work than
>> expected, because you have to write much more code because you are now in
> 7.
>> But again, stop doing things for an outdated Java version, when you are
>> building an API for a future JSR from scratch. It is simply useless IMO.
>>
>>
>>
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>>
>>>
>>> > On Friday, 2 January 2015, 14:02, Werner Keil
> <we...@gmail.com>
>>> wrote:
>>> > > Romain,
>>> >
>>> > That's a good point. I flagged this with e.g. JavaMoney. Given
> it aims
>>> more
>>> > at future platforms and e.g. java.util.Currency (or ICU4J) are
> already
>>> > available for Java 7 or even 6 and before, that seemed of less
> concern to
>>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9,
> so a
>>> > theoretical ME usage of the API could work in a future version of
> Java
>>> > (ME), too.
>>> >
>>> > Here it's more about backward-compatibility, and looking at
> other Apache
>>> > projects like DeviceMap, etc. a majority requires at most Java 6
> as
>>> minimum
>>> > version today. Some may have shifted to 7, but I couldn't
> think of an
>>> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so
> some
>>> > modules in DeltaSpike could eventually graduate to CDI 2 and
> require
>>> Java
>>> > SE 8, but a prior version of the same projects or modules will
> still work
>>> > with CDI 1.x and Java 7.
>>> >
>>> > There are a few "functional" aspects, but if you need to
> declare a
>>> > "Functional Interface" that works in Java 7 and 8 all
> you have to do
>>> > is
>>> > forget about the SE 8 annotation. It'll still work in 8 if
> declared
>>> right.
>>> > So we might have to declare some of the interfaces without the
>>> > @FunctionalInterface annotation (or comment it out for now) and
> refrain
>>> > from reusing those Java SE 8 provides. Stubbing them out with
> either
>>> config
>>> > specific or the same method names would be a solution.
>>> >
>>> > Optional was discussed in a hangout last night, and I wasn't
> under the
>>> > impression we would have to use it in places where a simple
> "null
>>> > check"
>>> > also works, so that doesn't look like a Java SE 8 feature to
> be seen as
>>> > mandadory or inevitable either.
>>> >
>>> > If the API was mostly portable, then some implementations or
> modules
>>> could
>>> > be SE 8 Specific. I heard, that is somehow like Spring does it,
> too;-)
>>> >
>>> >
>>> > Werner
>>> >
>>> >
>>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>>> > <rm...@gmail.com>
>>> > wrote:
>>> >
>>> >> Hi guys,
>>> >>
>>> >> I know we said java 8 is good to start a project but this is
> a blocker
>>> >> to make of tamaya built in config solution in project bound
> to java 7
>>> >> like JavaEE 7 containers for instance.
>>> >>
>>> >> Since Java 8 doesn't bring anything on implemtation point
> of view we
>>> >> mandate/cant replace by java 7 can we rethink about it?
>>> >>
>>> >>
>>> >> Romain Manni-Bucau
>>> >> @rmannibucau
>>> >> http://www.tomitribe.com
>>> >> http://rmannibucau.wordpress.com
>>> >> https://github.com/rmannibucau
>>> >>
>>> >
>>>
>>
>>
>>
>> --
>> *Anatole Tresch*
>> Java Engineer & Architect, JSR Spec Lead
>> Glärnischweg 10
>> CH - 8620 Wetzikon
>>
>> *Switzerland, Europe Zurich, GMT+1*
>> *Twitter: @atsticks*
>> *Blogs: **http://javaremarkables.blogspot.ch/
>> <http://javaremarkables.blogspot.ch/>*
>>
>> *Google: atsticksMobile +41-76 344 62 79*
>
Re: java 8: really?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
ok so let fork tamaya to support java 7, who will backport to java 8
banch - yeah nobody will use j8 branch today?
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-06 15:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Hi all
>
> I still think it is a real big mistake to go for Java 7. Do it in 8 and
> provide a backport for 7. Not the other way round!
> Some additional remarks inline:
>
> Cheers
> Anatole
>
>
> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>
>> I'm also still not convinced.
>>
>> Let's step back a few meters and simply compare the benefits vs the
>> downsides
>>
>>
>> - PRO
>> * more 'modern'
>> * Optional
>> * Functions
>> * default methods in interfaces
>>
> + Streams
> + extended functions on collections
> + date time API
> + concurrent improvements
>
>
>
>> - CON
>> * not backward compatible
>> * blocks adoption in current containers
>>
> -> no. the EE7 TCK is not running on Java 7, but the containers do! Even
> bigger companies like Credit Suisse are thinking on replacing the JDK
> during next year.
>
>
>
>> * blocks adoption in many user projects
>>
> But as well is a prop compared to other libraries existing and will for
> sure boost support by other well known JUGs such as SouJava and LJC..
>
>
>
>> * we actually don't really need any of it's features
>>
> Of course, you can build things without it. But as I said, it is as you
> would build code in Java 1.4 without generics. One year later you will have
> to overhaul your API, or somebody else will come and do it in its own
> project. And most important: a JSR based on Java 7 will never be accepted
> by the EC. So stop crying for the past, go for the future (and provide a
> backport - should be doable in 2-3 hours for a release).
>
>
>
>> Let's face it: JDK8 is still not production ready. It is somewhat slower
>> than Java7 still and I honestly know no single big project which runs on
>> Java8. Not even the JavaEE7 TCK passes on Java8..
>
> As I said before, I know also bigger companies that probably will go to
> Java 8 rather soon. And honestly I do not care. I wanted to build with you
> guys a modern API, not an outdated one ;)
>
>
> Ad Optional:
>>
>> The discussion we had was around Optional. The only impact it has on me
>> now is that instead of
>>
>>
>> if (blabla != null) {...}
>>
>> I've seen
>>
>> if (blabla.isPresent()) {..}
>>
>
> Please read my blog as stated in one of my first mails related to the
> topic.
>
> Instead of
>
> Optional<T> get(String)
>
> you get
>
> T get(String key);
> T getOrDefault(String key);
> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>
> Also all this must be done on your own, no fluent API for it ;(
>
> Most code I've seen simply don't use the ?. chain notation because it only
>> works for 'navigation' use cases. Which we barely have (except for
>> programmatic default values, but there are perfectly valid alternative
>> solutions as well).
>>
> I think its more that many programmers still did not have really worked
> with Java 8. For me it sounds like "the farmer only eats what he knows".
> After having worked with Java 8 for some months now, I will never go back,
> if not necessary, really.
>
>
>> Ad Functions:
>> I've not yet seen a benefit in our current API. Actually the only thing we
>> use it for currently is to replace 2 Comparator instances. I don't think
>> this is something we could't do with SE7 as well ;)
>>
> There are several cases where it has benefits, eg the additional property
> function in Filter. Without Java 8 you have to create an additional
> interface for it. MOst advantages beside the new abstraction possibilities
> are in the implementation. Several things are so much easier with Java 8...
>
> Ad default methods in interfaces:
>> Actually I'm not a huge fan of all those convenience functions in our
>> Configuration interface anyway. It just makes it harder to read.
>>
> SE is different than EE. You don't have CDI that helps a lot. That's a
> fact as it is. I as well wish there will be more. Perhaps we get with
> Jigsaw some additional features, but I will not ask for going for Java 9 as
> a base for the API ;)
> Harder to read is to some part also a matter of taste. When these things
> feel cumbersome, my personal reaction is, you should work more with Java 8
> and you will love that you have to write less abstract classes, you dont
> have to expose additional singletons for accessing things and you can
> greatly help SPI implementors out of the API instead of providing abstract
> classes and create deps on your implementation...
>
>
>
>> What about adding either a branch or a module for java7?
>>
> Could be an option, as I always said.
>
>
>
> That way we could continue trying implement our core functionality with
>> both. And at the end of the day we do a resume and weight up the pros and
>> cons again.
>>
> No, go for 8 and provide 7 in parallel by the colleagues that wants it.
> Since you state it is so important for the next decade there will be people
> that do the work, I assume. And don't complain if it is more work than
> expected, because you have to write much more code because you are now in 7.
> But again, stop doing things for an outdated Java version, when you are
> building an API for a future JSR from scratch. It is simply useless IMO.
>
>
>
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>> > On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com>
>> wrote:
>> > > Romain,
>> >
>> > That's a good point. I flagged this with e.g. JavaMoney. Given it aims
>> more
>> > at future platforms and e.g. java.util.Currency (or ICU4J) are already
>> > available for Java 7 or even 6 and before, that seemed of less concern to
>> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
>> > theoretical ME usage of the API could work in a future version of Java
>> > (ME), too.
>> >
>> > Here it's more about backward-compatibility, and looking at other Apache
>> > projects like DeviceMap, etc. a majority requires at most Java 6 as
>> minimum
>> > version today. Some may have shifted to 7, but I couldn't think of an
>> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
>> > modules in DeltaSpike could eventually graduate to CDI 2 and require
>> Java
>> > SE 8, but a prior version of the same projects or modules will still work
>> > with CDI 1.x and Java 7.
>> >
>> > There are a few "functional" aspects, but if you need to declare a
>> > "Functional Interface" that works in Java 7 and 8 all you have to do
>> > is
>> > forget about the SE 8 annotation. It'll still work in 8 if declared
>> right.
>> > So we might have to declare some of the interfaces without the
>> > @FunctionalInterface annotation (or comment it out for now) and refrain
>> > from reusing those Java SE 8 provides. Stubbing them out with either
>> config
>> > specific or the same method names would be a solution.
>> >
>> > Optional was discussed in a hangout last night, and I wasn't under the
>> > impression we would have to use it in places where a simple "null
>> > check"
>> > also works, so that doesn't look like a Java SE 8 feature to be seen as
>> > mandadory or inevitable either.
>> >
>> > If the API was mostly portable, then some implementations or modules
>> could
>> > be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
>> >
>> >
>> > Werner
>> >
>> >
>> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
>> > <rm...@gmail.com>
>> > wrote:
>> >
>> >> Hi guys,
>> >>
>> >> I know we said java 8 is good to start a project but this is a blocker
>> >> to make of tamaya built in config solution in project bound to java 7
>> >> like JavaEE 7 containers for instance.
>> >>
>> >> Since Java 8 doesn't bring anything on implemtation point of view we
>> >> mandate/cant replace by java 7 can we rethink about it?
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau
>> >> http://www.tomitribe.com
>> >> http://rmannibucau.wordpress.com
>> >> https://github.com/rmannibucau
>> >>
>> >
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
The biggest problem with a backport is, that unless both are done in
parallel if you start even after a first "milestone-incubator" release of
an artifact was out, the backport is likely outdated by then. See
ThreeTenBP, who with a sane mind would even use that. Either they use Java
SE 8 and get it as part of the JDK or they likely used JodaTime already;-)
I only saw one or two projects personally where JodaTime was actively used,
but as long as those remain with Java 7 neither of them will waste their
time and budget to switch to this BP before they may eventually move to
Java 8.
If we have enough resources who are willing to develop these in parallel,
then it could be an option, otherwise it seems like a risk.
Werner
On Tue, Jan 6, 2015 at 3:18 PM, Anatole Tresch <at...@gmail.com> wrote:
> Hi all
>
> I still think it is a real big mistake to go for Java 7. Do it in 8 and
> provide a backport for 7. Not the other way round!
> Some additional remarks inline:
>
> Cheers
> Anatole
>
>
> 2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>
> > I'm also still not convinced.
> >
> > Let's step back a few meters and simply compare the benefits vs the
> > downsides
> >
> >
> > - PRO
> > * more 'modern'
> > * Optional
> > * Functions
> > * default methods in interfaces
> >
> + Streams
> + extended functions on collections
> + date time API
> + concurrent improvements
>
>
>
> > - CON
> > * not backward compatible
> > * blocks adoption in current containers
> >
> -> no. the EE7 TCK is not running on Java 7, but the containers do! Even
> bigger companies like Credit Suisse are thinking on replacing the JDK
> during next year.
>
>
>
> > * blocks adoption in many user projects
> >
> But as well is a prop compared to other libraries existing and will for
> sure boost support by other well known JUGs such as SouJava and LJC..
>
>
>
> > * we actually don't really need any of it's features
> >
> Of course, you can build things without it. But as I said, it is as you
> would build code in Java 1.4 without generics. One year later you will have
> to overhaul your API, or somebody else will come and do it in its own
> project. And most important: a JSR based on Java 7 will never be accepted
> by the EC. So stop crying for the past, go for the future (and provide a
> backport - should be doable in 2-3 hours for a release).
>
>
>
> > Let's face it: JDK8 is still not production ready. It is somewhat slower
> > than Java7 still and I honestly know no single big project which runs on
> > Java8. Not even the JavaEE7 TCK passes on Java8..
>
> As I said before, I know also bigger companies that probably will go to
> Java 8 rather soon. And honestly I do not care. I wanted to build with you
> guys a modern API, not an outdated one ;)
>
>
> Ad Optional:
> >
> > The discussion we had was around Optional. The only impact it has on me
> > now is that instead of
> >
> >
> > if (blabla != null) {...}
> >
> > I've seen
> >
> > if (blabla.isPresent()) {..}
> >
>
> Please read my blog as stated in one of my first mails related to the
> topic.
>
> Instead of
>
> Optional<T> get(String)
>
> you get
>
> T get(String key);
> T getOrDefault(String key);
> T getOrThrow(String key, ExceptionFactory<T>) throws T;
>
> Also all this must be done on your own, no fluent API for it ;(
>
> Most code I've seen simply don't use the ?. chain notation because it only
> > works for 'navigation' use cases. Which we barely have (except for
> > programmatic default values, but there are perfectly valid alternative
> > solutions as well).
> >
> I think its more that many programmers still did not have really worked
> with Java 8. For me it sounds like "the farmer only eats what he knows".
> After having worked with Java 8 for some months now, I will never go back,
> if not necessary, really.
>
>
> > Ad Functions:
> > I've not yet seen a benefit in our current API. Actually the only thing
> we
> > use it for currently is to replace 2 Comparator instances. I don't think
> > this is something we could't do with SE7 as well ;)
> >
> There are several cases where it has benefits, eg the additional property
> function in Filter. Without Java 8 you have to create an additional
> interface for it. MOst advantages beside the new abstraction possibilities
> are in the implementation. Several things are so much easier with Java 8...
>
> Ad default methods in interfaces:
> > Actually I'm not a huge fan of all those convenience functions in our
> > Configuration interface anyway. It just makes it harder to read.
> >
> SE is different than EE. You don't have CDI that helps a lot. That's a
> fact as it is. I as well wish there will be more. Perhaps we get with
> Jigsaw some additional features, but I will not ask for going for Java 9 as
> a base for the API ;)
> Harder to read is to some part also a matter of taste. When these things
> feel cumbersome, my personal reaction is, you should work more with Java 8
> and you will love that you have to write less abstract classes, you dont
> have to expose additional singletons for accessing things and you can
> greatly help SPI implementors out of the API instead of providing abstract
> classes and create deps on your implementation...
>
>
>
> > What about adding either a branch or a module for java7?
> >
> Could be an option, as I always said.
>
>
>
> That way we could continue trying implement our core functionality with
> > both. And at the end of the day we do a resume and weight up the pros and
> > cons again.
> >
> No, go for 8 and provide 7 in parallel by the colleagues that wants it.
> Since you state it is so important for the next decade there will be people
> that do the work, I assume. And don't complain if it is more work than
> expected, because you have to write much more code because you are now in
> 7.
> But again, stop doing things for an outdated Java version, when you are
> building an API for a future JSR from scratch. It is simply useless IMO.
>
>
>
> >
> > LieGrue,
> > strub
> >
> >
> >
> >
> > > On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com>
> > wrote:
> > > > Romain,
> > >
> > > That's a good point. I flagged this with e.g. JavaMoney. Given it aims
> > more
> > > at future platforms and e.g. java.util.Currency (or ICU4J) are already
> > > available for Java 7 or even 6 and before, that seemed of less concern
> to
> > > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
> > > theoretical ME usage of the API could work in a future version of Java
> > > (ME), too.
> > >
> > > Here it's more about backward-compatibility, and looking at other
> Apache
> > > projects like DeviceMap, etc. a majority requires at most Java 6 as
> > minimum
> > > version today. Some may have shifted to 7, but I couldn't think of an
> > > Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
> > > modules in DeltaSpike could eventually graduate to CDI 2 and require
> > Java
> > > SE 8, but a prior version of the same projects or modules will still
> work
> > > with CDI 1.x and Java 7.
> > >
> > > There are a few "functional" aspects, but if you need to declare a
> > > "Functional Interface" that works in Java 7 and 8 all you have to do
> > > is
> > > forget about the SE 8 annotation. It'll still work in 8 if declared
> > right.
> > > So we might have to declare some of the interfaces without the
> > > @FunctionalInterface annotation (or comment it out for now) and refrain
> > > from reusing those Java SE 8 provides. Stubbing them out with either
> > config
> > > specific or the same method names would be a solution.
> > >
> > > Optional was discussed in a hangout last night, and I wasn't under the
> > > impression we would have to use it in places where a simple "null
> > > check"
> > > also works, so that doesn't look like a Java SE 8 feature to be seen as
> > > mandadory or inevitable either.
> > >
> > > If the API was mostly portable, then some implementations or modules
> > could
> > > be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
> > >
> > >
> > > Werner
> > >
> > >
> > > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > > <rm...@gmail.com>
> > > wrote:
> > >
> > >> Hi guys,
> > >>
> > >> I know we said java 8 is good to start a project but this is a
> blocker
> > >> to make of tamaya built in config solution in project bound to java 7
> > >> like JavaEE 7 containers for instance.
> > >>
> > >> Since Java 8 doesn't bring anything on implemtation point of view we
> > >> mandate/cant replace by java 7 can we rethink about it?
> > >>
> > >>
> > >> Romain Manni-Bucau
> > >> @rmannibucau
> > >> http://www.tomitribe.com
> > >> http://rmannibucau.wordpress.com
> > >> https://github.com/rmannibucau
> > >>
> > >
> >
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
>
Re: java 8: really?
Posted by Anatole Tresch <at...@gmail.com>.
Hi all
I still think it is a real big mistake to go for Java 7. Do it in 8 and
provide a backport for 7. Not the other way round!
Some additional remarks inline:
Cheers
Anatole
2015-01-06 14:26 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> I'm also still not convinced.
>
> Let's step back a few meters and simply compare the benefits vs the
> downsides
>
>
> - PRO
> * more 'modern'
> * Optional
> * Functions
> * default methods in interfaces
>
+ Streams
+ extended functions on collections
+ date time API
+ concurrent improvements
> - CON
> * not backward compatible
> * blocks adoption in current containers
>
-> no. the EE7 TCK is not running on Java 7, but the containers do! Even
bigger companies like Credit Suisse are thinking on replacing the JDK
during next year.
> * blocks adoption in many user projects
>
But as well is a prop compared to other libraries existing and will for
sure boost support by other well known JUGs such as SouJava and LJC..
> * we actually don't really need any of it's features
>
Of course, you can build things without it. But as I said, it is as you
would build code in Java 1.4 without generics. One year later you will have
to overhaul your API, or somebody else will come and do it in its own
project. And most important: a JSR based on Java 7 will never be accepted
by the EC. So stop crying for the past, go for the future (and provide a
backport - should be doable in 2-3 hours for a release).
> Let's face it: JDK8 is still not production ready. It is somewhat slower
> than Java7 still and I honestly know no single big project which runs on
> Java8. Not even the JavaEE7 TCK passes on Java8..
As I said before, I know also bigger companies that probably will go to
Java 8 rather soon. And honestly I do not care. I wanted to build with you
guys a modern API, not an outdated one ;)
Ad Optional:
>
> The discussion we had was around Optional. The only impact it has on me
> now is that instead of
>
>
> if (blabla != null) {...}
>
> I've seen
>
> if (blabla.isPresent()) {..}
>
Please read my blog as stated in one of my first mails related to the
topic.
Instead of
Optional<T> get(String)
you get
T get(String key);
T getOrDefault(String key);
T getOrThrow(String key, ExceptionFactory<T>) throws T;
Also all this must be done on your own, no fluent API for it ;(
Most code I've seen simply don't use the ?. chain notation because it only
> works for 'navigation' use cases. Which we barely have (except for
> programmatic default values, but there are perfectly valid alternative
> solutions as well).
>
I think its more that many programmers still did not have really worked
with Java 8. For me it sounds like "the farmer only eats what he knows".
After having worked with Java 8 for some months now, I will never go back,
if not necessary, really.
> Ad Functions:
> I've not yet seen a benefit in our current API. Actually the only thing we
> use it for currently is to replace 2 Comparator instances. I don't think
> this is something we could't do with SE7 as well ;)
>
There are several cases where it has benefits, eg the additional property
function in Filter. Without Java 8 you have to create an additional
interface for it. MOst advantages beside the new abstraction possibilities
are in the implementation. Several things are so much easier with Java 8...
Ad default methods in interfaces:
> Actually I'm not a huge fan of all those convenience functions in our
> Configuration interface anyway. It just makes it harder to read.
>
SE is different than EE. You don't have CDI that helps a lot. That's a
fact as it is. I as well wish there will be more. Perhaps we get with
Jigsaw some additional features, but I will not ask for going for Java 9 as
a base for the API ;)
Harder to read is to some part also a matter of taste. When these things
feel cumbersome, my personal reaction is, you should work more with Java 8
and you will love that you have to write less abstract classes, you dont
have to expose additional singletons for accessing things and you can
greatly help SPI implementors out of the API instead of providing abstract
classes and create deps on your implementation...
> What about adding either a branch or a module for java7?
>
Could be an option, as I always said.
That way we could continue trying implement our core functionality with
> both. And at the end of the day we do a resume and weight up the pros and
> cons again.
>
No, go for 8 and provide 7 in parallel by the colleagues that wants it.
Since you state it is so important for the next decade there will be people
that do the work, I assume. And don't complain if it is more work than
expected, because you have to write much more code because you are now in 7.
But again, stop doing things for an outdated Java version, when you are
building an API for a future JSR from scratch. It is simply useless IMO.
>
> LieGrue,
> strub
>
>
>
>
> > On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com>
> wrote:
> > > Romain,
> >
> > That's a good point. I flagged this with e.g. JavaMoney. Given it aims
> more
> > at future platforms and e.g. java.util.Currency (or ICU4J) are already
> > available for Java 7 or even 6 and before, that seemed of less concern to
> > the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
> > theoretical ME usage of the API could work in a future version of Java
> > (ME), too.
> >
> > Here it's more about backward-compatibility, and looking at other Apache
> > projects like DeviceMap, etc. a majority requires at most Java 6 as
> minimum
> > version today. Some may have shifted to 7, but I couldn't think of an
> > Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
> > modules in DeltaSpike could eventually graduate to CDI 2 and require
> Java
> > SE 8, but a prior version of the same projects or modules will still work
> > with CDI 1.x and Java 7.
> >
> > There are a few "functional" aspects, but if you need to declare a
> > "Functional Interface" that works in Java 7 and 8 all you have to do
> > is
> > forget about the SE 8 annotation. It'll still work in 8 if declared
> right.
> > So we might have to declare some of the interfaces without the
> > @FunctionalInterface annotation (or comment it out for now) and refrain
> > from reusing those Java SE 8 provides. Stubbing them out with either
> config
> > specific or the same method names would be a solution.
> >
> > Optional was discussed in a hangout last night, and I wasn't under the
> > impression we would have to use it in places where a simple "null
> > check"
> > also works, so that doesn't look like a Java SE 8 feature to be seen as
> > mandadory or inevitable either.
> >
> > If the API was mostly portable, then some implementations or modules
> could
> > be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
> >
> >
> > Werner
> >
> >
> > On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> > <rm...@gmail.com>
> > wrote:
> >
> >> Hi guys,
> >>
> >> I know we said java 8 is good to start a project but this is a blocker
> >> to make of tamaya built in config solution in project bound to java 7
> >> like JavaEE 7 containers for instance.
> >>
> >> Since Java 8 doesn't bring anything on implemtation point of view we
> >> mandate/cant replace by java 7 can we rethink about it?
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: java 8: really?
Posted by Mark Struberg <st...@yahoo.de>.
I'm also still not convinced.
Let's step back a few meters and simply compare the benefits vs the downsides
- PRO
* more 'modern'
* Optional
* Functions
* default methods in interfaces
- CON
* not backward compatible
* blocks adoption in current containers
* blocks adoption in many user projects
* we actually don't really need any of it's features
Let's face it: JDK8 is still not production ready. It is somewhat slower than Java7 still and I honestly know no single big project which runs on Java8. Not even the JavaEE7 TCK passes on Java8...
Ad Optional:
The discussion we had was around Optional. The only impact it has on me now is that instead of
if (blabla != null) {...}
I've seen
if (blabla.isPresent()) {..}
Most code I've seen simply don't use the ?. chain notation because it only works for 'navigation' use cases. Which we barely have (except for programmatic default values, but there are perfectly valid alternative solutions as well).
Ad Functions:
I've not yet seen a benefit in our current API. Actually the only thing we use it for currently is to replace 2 Comparator instances. I don't think this is something we could't do with SE7 as well ;)
Ad default methods in interfaces:
Actually I'm not a huge fan of all those convenience functions in our Configuration interface anyway. It just makes it harder to read.
What about adding either a branch or a module for java7?
That way we could continue trying implement our core functionality with both. And at the end of the day we do a resume and weight up the pros and cons again.
LieGrue,
strub
> On Friday, 2 January 2015, 14:02, Werner Keil <we...@gmail.com> wrote:
> > Romain,
>
> That's a good point. I flagged this with e.g. JavaMoney. Given it aims more
> at future platforms and e.g. java.util.Currency (or ICU4J) are already
> available for Java 7 or even 6 and before, that seemed of less concern to
> the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
> theoretical ME usage of the API could work in a future version of Java
> (ME), too.
>
> Here it's more about backward-compatibility, and looking at other Apache
> projects like DeviceMap, etc. a majority requires at most Java 6 as minimum
> version today. Some may have shifted to 7, but I couldn't think of an
> Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
> modules in DeltaSpike could eventually graduate to CDI 2 and require Java
> SE 8, but a prior version of the same projects or modules will still work
> with CDI 1.x and Java 7.
>
> There are a few "functional" aspects, but if you need to declare a
> "Functional Interface" that works in Java 7 and 8 all you have to do
> is
> forget about the SE 8 annotation. It'll still work in 8 if declared right.
> So we might have to declare some of the interfaces without the
> @FunctionalInterface annotation (or comment it out for now) and refrain
> from reusing those Java SE 8 provides. Stubbing them out with either config
> specific or the same method names would be a solution.
>
> Optional was discussed in a hangout last night, and I wasn't under the
> impression we would have to use it in places where a simple "null
> check"
> also works, so that doesn't look like a Java SE 8 feature to be seen as
> mandadory or inevitable either.
>
> If the API was mostly portable, then some implementations or modules could
> be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
>
>
> Werner
>
>
> On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau
> <rm...@gmail.com>
> wrote:
>
>> Hi guys,
>>
>> I know we said java 8 is good to start a project but this is a blocker
>> to make of tamaya built in config solution in project bound to java 7
>> like JavaEE 7 containers for instance.
>>
>> Since Java 8 doesn't bring anything on implemtation point of view we
>> mandate/cant replace by java 7 can we rethink about it?
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>
Re: java 8: really?
Posted by Werner Keil <we...@gmail.com>.
Romain,
That's a good point. I flagged this with e.g. JavaMoney. Given it aims more
at future platforms and e.g. java.util.Currency (or ICU4J) are already
available for Java 7 or even 6 and before, that seemed of less concern to
the EG or Anatole. Oracle stated, Lambdas may come to ME 8.x or 9, so a
theoretical ME usage of the API could work in a future version of Java
(ME), too.
Here it's more about backward-compatibility, and looking at other Apache
projects like DeviceMap, etc. a majority requires at most Java 6 as minimum
version today. Some may have shifted to 7, but I couldn't think of an
Apache project that was Java 8 minimum. CDI 2 plans to do that, so some
modules in DeltaSpike could eventually graduate to CDI 2 and require Java
SE 8, but a prior version of the same projects or modules will still work
with CDI 1.x and Java 7.
There are a few "functional" aspects, but if you need to declare a
"Functional Interface" that works in Java 7 and 8 all you have to do is
forget about the SE 8 annotation. It'll still work in 8 if declared right.
So we might have to declare some of the interfaces without the
@FunctionalInterface annotation (or comment it out for now) and refrain
from reusing those Java SE 8 provides. Stubbing them out with either config
specific or the same method names would be a solution.
Optional was discussed in a hangout last night, and I wasn't under the
impression we would have to use it in places where a simple "null check"
also works, so that doesn't look like a Java SE 8 feature to be seen as
mandadory or inevitable either.
If the API was mostly portable, then some implementations or modules could
be SE 8 Specific. I heard, that is somehow like Spring does it, too;-)
Werner
On Fri, Jan 2, 2015 at 12:03 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:
> Hi guys,
>
> I know we said java 8 is good to start a project but this is a blocker
> to make of tamaya built in config solution in project bound to java 7
> like JavaEE 7 containers for instance.
>
> Since Java 8 doesn't bring anything on implemtation point of view we
> mandate/cant replace by java 7 can we rethink about it?
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>