LJC Lambdas Hackday

Martijn Verburg martijnverburg at gmail.com
Tue Jun 5 13:53:12 PDT 2012


Hi All,

On Tuesday, 5 June 2012, Richard Warburton wrote:

> > Were there examples where you felt "It *should* be easy to lambda-ize
> this,
> > but I can't figure out how?"  These would be useful examples to discuss
> > here.
>
> I didn't make an exact list of what was harder than people felt it
> should be, however from informal discussion some of the problems were
> basically a result of existing code being 'unclean'.
>
> When you're doing a chain of lambda operations each sequence in the
> chain usually does one thing:  it transforms a collection or it
> collapses it down.  In many existing codebases you'll have a loop that
> iterates over a collection and does multiple things.  Which sometimes
> makes it harder than people feel it should be to lambda-ize because it
> may involve a more than local refactoring.  I'm not sure there's
> anything you can suggest here other than to refactor early and often
> and keep things SRP.
>
> I don't know if any of the other people on the list who attended the
> hackday have an experience to share?
>
> I think if we run another one of these events that we should try to
> focus in more detail on identifying these kind of scenarios - ie where
> it looks easy but then turns out to be trickier.
>
> regards,
>
>  Richard


I concur, a second day will help tease this out. It did seem to be a
genuine problem that developers struggled to identify existing code that
could/should have lambdas applied due to messy legacy code. But perhaps
this is more for the IDE folks to explore with their refactoring
capabilities down the line.

Cheers,
Martijn


More information about the lambda-dev mailing list