{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,21]],"date-time":"2026-09-21T15:07:08Z","timestamp":1790003228813,"version":"4.0.1"},"reference-count":62,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2017,10,12]],"date-time":"2017-10-12T00:00:00Z","timestamp":1507766400000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["CCF-1439957,CCF-1553741"],"award-info":[{"award-number":["CCF-1439957,CCF-1553741"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100000038","name":"Natural Sciences and Engineering Research Council of Canada","doi-asserted-by":"publisher","award":["435480-2013"],"award-info":[{"award-number":["435480-2013"]}],"id":[{"id":"10.13039\/501100000038","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2017,10,12]]},"abstract":"<jats:p>Java 8 retrofitted lambda expressions, a core feature of functional programming, into a mainstream object-oriented language with an imperative paradigm. However, we do not know how Java developers have adapted to the functional style of thinking, and more importantly, what are the reasons motivating Java developers to adopt functional programming. Without such knowledge, researchers miss opportunities to improve the state of the art, tool builders use unrealistic assumptions, language designers fail to improve upon their designs, and developers are unable to explore efficient and effective use of lambdas.<\/jats:p>\n                  <jats:p>We present the first large-scale, quantitative and qualitative empirical study to shed light on how imperative programmers use lambda expressions as a gateway into functional thinking. Particularly, we statically scrutinize the source code of 241 open-source projects with 19,770 contributors, to study the characteristics of 100,540 lambda expressions. Moreover, we investigate the historical trends and adoption rates of lambdas in the studied projects. To get a complementary perspective, we seek the underlying reasons on why developers introduce lambda expressions, by surveying 97 developers who are introducing lambdas in their projects, using the firehouse interview method.<\/jats:p>\n                  <jats:p>Among others, our findings revealed an increasing trend in the adoption of lambdas in Java: in 2016, the ratio of lambdas introduced per added line of code increased by 54% compared to 2015. Lambdas were used for various reasons, including but not limited to (i) making existing code more succinct and readable, (ii) avoiding code duplication, and (iii) simulating lazy evaluation of functions. Interestingly, we found out that developers are using Java's built-in functional interfaces inefficiently, i.e., they prefer to use general functional interfaces over the specialized ones, overlooking the performance overheads that might be imposed. Furthermore, developers are not adopting techniques from functional programming, e.g., currying. Finally, we present the implications of our findings for researchers, tool builders, language designers, and developers.<\/jats:p>","DOI":"10.1145\/3133909","type":"journal-article","created":{"date-parts":[[2017,10,13]],"date-time":"2017-10-13T11:15:45Z","timestamp":1507893345000},"page":"1-31","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":69,"title":["Understanding the use of lambda expressions in Java"],"prefix":"10.1145","volume":"1","author":[{"given":"Davood","family":"Mazinanian","sequence":"first","affiliation":[{"name":"Concordia University, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ameya","family":"Ketkar","sequence":"additional","affiliation":[{"name":"Oregon State University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Nikolaos","family":"Tsantalis","sequence":"additional","affiliation":[{"name":"Concordia University, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Danny","family":"Dig","sequence":"additional","affiliation":[{"name":"Oregon State University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,10,12]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2015.11.009"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2015.2414917"},{"key":"e_1_2_1_3_1","volume-title":"Lambda Expressions and Functional Interfaces: Tips and Best Practices. (November","year":"2016","unstructured":"Baeldung. 2016. Lambda Expressions and Functional Interfaces: Tips and Best Practices. (November 2016). http:\/\/www. baeldung.com\/java-8-lambda-expressions-tips"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133876"},{"key":"e_1_2_1_5_1","volume-title":"Proceedings of the 9th International Symposium on Software Metrics (METRICS \u201903)","author":"Bieman James M.","unstructured":"James M. Bieman, Greg Straw, Huxia Wang, P. Willard Munger, and Roger T. Alexander. 2003. Design Patterns and Change Proneness: An Examination of Five Evolving Systems. In Proceedings of the 9th International Symposium on Software Metrics (METRICS \u201903). 40\u201349. http:\/\/dl.acm.org\/citation.cfm?id=942804.943777"},{"key":"e_1_2_1_6_1","volume-title":"Effective Java: A Programming Language Guide","author":"Bloch Joshua","year":"2008","unstructured":"Joshua Bloch. 2008. Effective Java: A Programming Language Guide. Addison-Wesley Professional."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2647508.2647520"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1191\/1478088706qp063oa"},{"key":"e_1_2_1_9_1","volume-title":"Eclipse Support for Java 8. (March","author":"Bull Ian","year":"2014","unstructured":"Ian Bull. 2014. Eclipse Support for Java 8. (March 2014). http:\/\/eclipsesource.com\/blogs\/2014\/03\/25\/ eclipse-support-for-java-8\/"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1177\/0049124113500475"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.2307\/1968337"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884798"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/3030207.3030221"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2011.01.004"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/1140543.1140549"},{"key":"e_1_2_1_16_1","unstructured":"Eclipse Java development tools. 2017. JDT Components. (2017). http:\/\/www.eclipse.org\/jdt\/"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568295"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-84800-044-5_11"},{"key":"e_1_2_1_19_1","unstructured":"Lukas Eder. 2014. jOO\u03bb - The Missing Parts in Java 8. (2014). https:\/\/github.com\/jOOQ\/jOOL"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2013.6606699"},{"key":"e_1_2_1_21_1","volume-title":"Design Patterns: Elements of Reusable Object-Oriented Software","author":"Gamma Erich","year":"1994","unstructured":"Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1994. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional."},{"key":"e_1_2_1_22_1","unstructured":"Trisha Gee. 2015. Debugger Improvements. (November 2015). https:\/\/www.youtube.com\/watch?v=rimzOolGguo"},{"key":"e_1_2_1_23_1","volume-title":"Translation of Lambda Expressions. (April","author":"Goetz Brian","year":"2012","unstructured":"Brian Goetz. 2012. Translation of Lambda Expressions. (April 2012). http:\/\/cr.openjdk.java.net\/~briangoetz\/lambda\/ lambda-translation.html"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2491411.2491461"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1080\/00031305.1998.10480559"},{"key":"e_1_2_1_26_1","volume-title":"Migrating to Java 8. (April","author":"J.","year":"2017","unstructured":"IntelliJ. 2017. Migrating to Java 8. (April 2017). https:\/\/www.jetbrains.com\/help\/idea\/2017.1\/migrating-to-java-8.html"},{"key":"e_1_2_1_27_1","unstructured":"JavaParser. 2017. Java 9 Parser and Abstract Syntax Tree for Java. (2017). http:\/\/javaparser.org\/"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1109\/CSMR.2008.4493325"},{"key":"e_1_2_1_29_1","unstructured":"Sergey Kuksenko. 2013. JDK 8: Lambda Performance study. (2013). http:\/\/www.oracle.com\/technetwork\/java\/ jvmls2013kuksen-2014088.pdf"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.2307\/1907187"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2004.1357820"},{"key":"e_1_2_1_32_1","unstructured":"Davood Mazinanian Ameya Ketkar Nikolaos Tsantalis and Danny Dig. 2017. Supplemental material. (2017). http: \/\/dmazinanian.me\/conference-papers\/oopsla\/2017\/07\/04\/oopsla17.html"},{"key":"e_1_2_1_33_1","unstructured":"Bart\u0142omiej Mazur. 2017. Performance of Java part 2. (2017). https:\/\/blog.gotofinal.com\/java\/benchmark\/performance\/2017\/ 07\/09\/performance-of-java-1.html"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1016\/S1571-0661(05)80549-3"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2009.5070529"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2014.2357438"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2007.33"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2015.208"},{"key":"e_1_2_1_39_1","volume-title":"Java Performance: The Definitive Guide: Getting the Most Out of Your Code. O\u2019Reilly Media.","author":"Oaks Scott","year":"2014","unstructured":"Scott Oaks. 2014. Java Performance: The Definitive Guide: Getting the Most Out of Your Code. O\u2019Reilly Media."},{"key":"e_1_2_1_40_1","volume-title":"Java SE 8: Lambda Quick Start. (December","year":"2013","unstructured":"Oracle. 2013. Java SE 8: Lambda Quick Start. (December 2013). http:\/\/www.oracle.com\/webfolder\/technetwork\/tutorials\/ obe\/java\/Lambda-QuickStart\/index.html"},{"key":"e_1_2_1_41_1","volume-title":"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/Optional.html","author":"Optional","year":"2014","unstructured":"Oracle. 2014. Optional ( Java 8 Documentation). (2014). https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/Optional.html"},{"key":"e_1_2_1_42_1","volume-title":"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/javaOO\/lambdaexpressions.html","author":"Expressions Lambda","year":"2015","unstructured":"Oracle. 2015a. Lambda Expressions. (2015). https:\/\/docs.oracle.com\/javase\/tutorial\/java\/javaOO\/lambdaexpressions.html"},{"key":"e_1_2_1_43_1","volume-title":"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/generics\/genTypeInference.html","author":"Inference Type","year":"2015","unstructured":"Oracle. 2015b. Type Inference. (2015). https:\/\/docs.oracle.com\/javase\/tutorial\/java\/generics\/genTypeInference.html"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2012.6227200"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/1985441.1985446"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.988711"},{"key":"e_1_2_1_47_1","volume-title":"The Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary. O\u2019Reilly &amp","author":"Raymond Eric S.","unstructured":"Eric S. Raymond. 2001. The Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary. O\u2019Reilly &amp; Associates, Inc., Sebastopol, CA, USA."},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-013-9298-0"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-45070-2_12"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1080\/01621459.1968.10480934"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-39185-1_16"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/2950290.2950305"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-84800-044-5_1"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-39038-8_24"},{"key":"e_1_2_1_55_1","volume-title":"https:\/\/github.com\/TouK\/ThrowingFunction","author":"ThrowingFunction K.","year":"2017","unstructured":"TouK. 2017. ThrowingFunction. (2017). https:\/\/github.com\/TouK\/ThrowingFunction"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2015.2448531"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.14"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884849"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1023\/B:EMSE.0000027778.69251.1f"},{"key":"e_1_2_1_60_1","volume-title":"Smart Migration to JDK 8 in NetBeans IDE. (January","author":"Wielenga Geertjan","year":"2014","unstructured":"Geertjan Wielenga. 2014. Smart Migration to JDK 8 in NetBeans IDE. (January 2014). https:\/\/netbeans.org\/kb\/docs\/java\/ jdk8-migration-screencast.html"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-014-9319-7"},{"key":"e_1_2_1_62_1","volume-title":"Benchmark: How Misusing Streams Can Make Your Code 5 Times Slower.","author":"Zhitnitsky Alex","year":"2015","unstructured":"Alex Zhitnitsky. 2015. Benchmark: How Misusing Streams Can Make Your Code 5 Times Slower. (2015). http:\/\/blog.takipi. com\/benchmark-how-java-8-lambdas-and-streams-can-make-your-code-5-times-slower\/"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3133909","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3133909","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3133909","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,10]],"date-time":"2026-09-10T16:08:34Z","timestamp":1789056514000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3133909"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,10,12]]},"references-count":62,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2017,10,12]]}},"alternative-id":["10.1145\/3133909"],"URL":"https:\/\/doi.org\/10.1145\/3133909","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,10,12]]},"assertion":[{"value":"2017-10-12","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}