Comment by nunobrito

Comment by nunobrito 3 days ago

2 replies

I'm that author. It has been more than a decade and still won't use streams nor lambdas. Makes the code too difficult to write and debug for me.

Really prefer to have more lines of code and understanding very clearly what each one is doing, than convoluting too many instructions on a single line.

harladsinsteden 2 days ago

For me it's the opposite: If I had to write the code that I usually use lambdas for in any other way then _that_ would be very difficult to write and to debug.

Especially when writing JavaFX code which is full of callbacks and event handlers I really don't see any other (useful) option.

Can lambdas be misused? Of course they can - but so can every other code construct.

samus 2 days ago

I bet you don't like how it looks when you put huge code blocks inside a lambda. Me neither. But that's an issue with coding style; it forces you to extract processing code into a method. I'd argue the opposite way - imperative syntax constructs make spaghetti code too easy to work with.