• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java 8 lambdas vs Common Lisp

 
Thad Humphries
Greenhorn
Posts: 26
Google Web Toolkit Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the last time I touch FP or lambda's was 20+ years ago writing Common Lisp in grad school. I was considerably less experienced then, and I well may not have grasp some of the finer points, but I was happy to move on to C++ and, yes, even Ada. Now with 15+ years of Java experience, I don't think I've ever missed passing a function as a parameter. What's changed lambdas to convince me? And is Java the best language for this? The change seems so drastic that maybe I'm better off learning a whole new language vs messing with old approaches that are straightforward and usable (aka, if it ain't broke, don't fix it).
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thad,

If you have passed an instance of a single method anonymous inner class to a function (Runnable, Callable, FileFilter, ActionListener,...), you have passed function as parameter,
except by wrapping it in an object. That was a lot of ceremony and noise, but we got used to it so much that we don't feel it. If it was less noisy and more fluent, would we design
more functions that took functions as parameters?

Language capability == design capability.

Now that we can more easily pass lambdas, it would start to influence the way we design in Java moving forward.

Thanks,

Venkat
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!