Hi Babak,
I like lambdas as a concise way of writing callbacks and short
stateless functions. I have my IDE auto replace inner classes with
lambdas where applicable.

I wouldn't use them on hot paths as they incur a deeper stack. On hot
paths I'd prefer that we use stateless anonymous classes and avoid
allocating new instances if possible, i.e. cache them in a class

Where possible we should annotate Camel public API with
@FunctionalInterface, to enable users to use them as they see fit.



On Fri, Oct 11, 2019 at 10:12 AM Babak Vahdat
<babak.vah...@swissonline.ch> wrote:
> Hi
> Would it make sense to you if we would change all the anonymous classes in 
> Camel codebase to lambda expression where possible? Or any other idea you may 
> have in this context?
> Babak

Zoran Regvart

Reply via email to