Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Let's Lambda!

So I was thinking about how great our code looks, and we need to keep up
our efforts to keep it as clean as possible. I am going to suggest
something, feel free to shoot it down.

If you are writing an anon class or a listener, consider using a lambda
expression instead. It will not make an object and therefore should
reduce the quantity of objects allocated.

The lambda will also encourage statelessness and therefore potentially
reduce leaks.

Finally it will make our code more compact. I am not saying it's more
readable, but we can get more code on our screen at any moment, and that
is a good thing.

Thoughts?


Back to the top