Use of lambdas and other Java 8 features

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Use of lambdas and other Java 8 features

daradurvs
Hi, Igniters!

Since we official support Java 8, I want to find out the following question:

Are there any restrictions on using lambdas and other Java 8 features?

--
Best Regards, Vyacheslav D.
Reply | Threaded
Open this post in threaded view
|

Re: Use of lambdas and other Java 8 features

Dmitriy Pavlov
Hi Vyacheslav,

It is possible to use lambdas in test code and node local-only code (e.g.
checkpointing, page memory, etc).

In other words any other classes, which are transferred/may be trasnferred
into network, can't use lambdas.

There is also recommendation to avoid mass change of anonymous classes to
lambdas because of difficulties of backporting.

Sincerely,
Dmitriy Pavlov

пн, 5 мар. 2018 г. в 18:07, Vyacheslav Daradur <[hidden email]>:

> Hi, Igniters!
>
> Since we official support Java 8, I want to find out the following
> question:
>
> Are there any restrictions on using lambdas and other Java 8 features?
>
> --
> Best Regards, Vyacheslav D.
>
Reply | Threaded
Open this post in threaded view
|

Re: Use of lambdas and other Java 8 features

Vladimir Ozerov
In reply to this post by daradurvs
Hi Vyacheslav,

I would not recommend using them without strong reasons. While convenient
for developers in general, some of these features has hidden pitfails,
which may affect performance and serialization. But as our product is very
performance sensitive, it is better to have slightly more code which is
simple and expressive, rather than save several lines of code and loose
understanding on what is going on.

On Mon, Mar 5, 2018 at 6:07 PM, Vyacheslav Daradur <[hidden email]>
wrote:

> Hi, Igniters!
>
> Since we official support Java 8, I want to find out the following
> question:
>
> Are there any restrictions on using lambdas and other Java 8 features?
>
> --
> Best Regards, Vyacheslav D.
>
Reply | Threaded
Open this post in threaded view
|

Re: Use of lambdas and other Java 8 features

Dmitriy Pavlov
By the way, usage of lambdas instead of anonymous class may have positive
performance effect.

And Java 8 provides us a number of new features, which allows Ignite
operate faster (e.g. Arrays.parrallelSort, list.sort(), etc).

пн, 5 мар. 2018 г. в 18:15, Vladimir Ozerov <[hidden email]>:

> Hi Vyacheslav,
>
> I would not recommend using them without strong reasons. While convenient
> for developers in general, some of these features has hidden pitfails,
> which may affect performance and serialization. But as our product is very
> performance sensitive, it is better to have slightly more code which is
> simple and expressive, rather than save several lines of code and loose
> understanding on what is going on.
>
> On Mon, Mar 5, 2018 at 6:07 PM, Vyacheslav Daradur <[hidden email]>
> wrote:
>
> > Hi, Igniters!
> >
> > Since we official support Java 8, I want to find out the following
> > question:
> >
> > Are there any restrictions on using lambdas and other Java 8 features?
> >
> > --
> > Best Regards, Vyacheslav D.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Use of lambdas and other Java 8 features

daradurvs
Dmitry, Vladimir, thank you for the clarification!

On Mon, Mar 5, 2018 at 6:23 PM, Dmitry Pavlov <[hidden email]> wrote:

> By the way, usage of lambdas instead of anonymous class may have positive
> performance effect.
>
> And Java 8 provides us a number of new features, which allows Ignite
> operate faster (e.g. Arrays.parrallelSort, list.sort(), etc).
>
> пн, 5 мар. 2018 г. в 18:15, Vladimir Ozerov <[hidden email]>:
>
>> Hi Vyacheslav,
>>
>> I would not recommend using them without strong reasons. While convenient
>> for developers in general, some of these features has hidden pitfails,
>> which may affect performance and serialization. But as our product is very
>> performance sensitive, it is better to have slightly more code which is
>> simple and expressive, rather than save several lines of code and loose
>> understanding on what is going on.
>>
>> On Mon, Mar 5, 2018 at 6:07 PM, Vyacheslav Daradur <[hidden email]>
>> wrote:
>>
>> > Hi, Igniters!
>> >
>> > Since we official support Java 8, I want to find out the following
>> > question:
>> >
>> > Are there any restrictions on using lambdas and other Java 8 features?
>> >
>> > --
>> > Best Regards, Vyacheslav D.
>> >
>>



--
Best Regards, Vyacheslav D.