skip to main content
10.1145/3383219.3383255acmotherconferencesArticle/Chapter ViewAbstractPublication PageseaseConference Proceedingsconference-collections
short-paper

An Exploratory Study Towards Understanding Lambda Expressions in Python

Authors Info & Claims
Published:17 April 2020Publication History

ABSTRACT

Lambda expressions are anonymous functions in Python. It is one of the alternatives to write a function definition. Syntactically, it is a single expression and defined using the keyword lambda. Lambda expression is a functional programming feature, currently in use, in many mainstream programming languages such as Python, Java8, C++11. There are few studies in C++ and Java to understand the impact of lambda expressions on programmers. These studies are focusing on the developer's adaptability to use a functional style of construct and the benefit they gain from using it. However, we are not aware of any literature on the use of lambda expressions in Python. Thus, there is a need to study lambda expressions in Python projects. In this paper, we examine 15 GitHub repositories out of 760 from our dataset, that are using Python as their primary language. In this study, we are classifying the uses of lambda expressions based on varying scenarios. We identified 13 different usages of lambda expressions from these Python repositories. This catalog is an attempt to support programmers to use lambda expressions more effectively and efficiently.

References

  1. Anwar Alqaimi, Patanamon Thongtanunam, and Christoph Treude. 2019. Automatically Generating Documentation for Lambda Expressions in Java. arXiv preprint arXiv:1903.06348 (2019).Google ScholarGoogle Scholar
  2. Hendrik P Barendregt et al. 1984. The lambda calculus. Vol. 3. North-Holland Amsterdam.Google ScholarGoogle Scholar
  3. Hudson Borges and Marco Tulio Valente. 2018. What's in a GitHub star? understanding repository starring practices in a social coding platform. Journal of Systems and Software 146 (2018), 112--129.Google ScholarGoogle ScholarCross RefCross Ref
  4. Mary Campione and Kathy Walrath. 1998. The Java Tutorial: Object-Oriented Programming for the Internet (Book/CD). Addison-Wesley Longman Publishing Co., Inc.Google ScholarGoogle Scholar
  5. Paul Denny, Andrew Luxton-Reilly, and Ewan Tempero. 2012. All syntax errors are not equal. In Proceedings of the 17th ACM annual conference on Innovation and technology in computer science education. ACM, 75--80.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Paul Denny, Andrew Luxton-Reilly, Ewan Tempero, and Jacob Hendrickx. 2011. Understanding the syntax barrier for novices. In Proceedings of the 16th annual joint conference on Innovation and technology in computer science education. ACM, 208--212.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stefan Endrikat, Stefan Hanenberg, Romain Robbes, and Andreas Stefik. 2014. How do api documentation and static typing affect api usability?. In Proceedings of the 36th International Conference on Software Engineering. ACM, 632--642.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Lars Fischer and Stefan Hanenberg. 2015. An empirical investigation of the effects of type systems and code completion on api usability using typescript and javascript in ms visual studio. In ACM SIGPLAN Notices, Vol. 51. ACM, 154--167.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Stefan Hanenberg. 2010. Doubts about the positive impact of static type systems on programming tasks in single developer projects-an empirical study. In European Conference on Object-Oriented Programming. Springer, 300--303.Google ScholarGoogle ScholarCross RefCross Ref
  10. Stefan Hanenberg. 2010. An experiment about static and dynamic type systems: Doubts about the positive impact of static type systems on development time. In ACM Sigplan Notices, Vol. 45. ACM, 22--35.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Eirini Kalliamvakou, Georgios Gousios, Kelly Blincoe, Leif Singer, Daniel M German, and Daniela Damian. 2014. The promises and perils of mining GitHub. In Proceedings of the 11th working conference on mining software repositories. ACM, 92--101.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sebastian Kleinschmager, Romain Robbes, Andreas Stefik, Stefan Hanenberg, and Eric Tanter. 2012. Do static type systems improve the maintainability of software systems? An empirical study. In 2012 20th IEEE International Conference on Program Comprehension (ICPC). IEEE, 153--162.Google ScholarGoogle ScholarCross RefCross Ref
  13. Pavneet Singh Kochhar, Dinusha Wijedasa, and David Lo. 2016. A large scale study of multiple programming languages and code quality. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Vol. 1. IEEE, 563--573.Google ScholarGoogle ScholarCross RefCross Ref
  14. Mark Lutz. 2013. Learning python: Powerful object-oriented programming. " O'Reilly Media, Inc.".Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Clemens Mayer, Stefan Hanenberg, Romain Robbes, Éric Tanter, and Andreas Stefik. 2012. An empirical study of the influence of static type systems on the usability of undocumented software. In ACM SIGPLAN Notices, Vol. 47. ACM, 683--702.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Davood Mazinanian, Ameya Ketkar, Nikolaos Tsantalis, and Danny Dig. 2017. Understanding the use of lambda expressions in Java. Proceedings of the ACM on Programming Languages 1, OOPSLA (2017), 85.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Brad A Myers, Andreas Stefik, Stefan Hanenberg, Antti-Juhani Kaijanaho, Margaret Burnett, Franklyn Turbak, and Philip Wadler. 2016. Usability of programming languages: Special interest group (sig) meeting at chi 2016. In Proceedings of the 2016 chi conference extended abstracts on human factors in computing systems. ACM, 1104--1107.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Sebastian Nielebock, Robert Heumüller, and Frank Ortmeier. 2019. Programmers do not favor lambda expressions for concurrent object-oriented code. Empirical Software Engineering 24, 1 (2019), 103--138.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Jeffrey L Overbey and Ralph E Johnson. 2009. Regrowing a language: refactoring tools allow programming languages to evolve. ACM SIGPLAN Notices 44, 10 (2009), 493--502.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Pujan Petersen, Stefan Hanenberg, and Romain Robbes. 2014. An empirical comparison of static and dynamic type systems on API usage in the presence of an IDE: Java vs. groovy with eclipse. In Proceedings of the 22nd International Conference on Program Comprehension. ACM, 212--222.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Baishakhi Ray, Daryl Posnett, Vladimir Filkov, and Premkumar Devanbu. 2014. A large scale study of programming languages and code quality in github. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 155--165.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Shubham Sangle and Sandeep Muvva. 2019. On the use of lambda expressions in 760 open source Python projects. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ACM, 1232--1234.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ben Shneiderman. 1980. Software psychology: Human factors in computer and information systems. (1980).Google ScholarGoogle Scholar
  24. Andreas Stefik and Susanna Siebert. 2013. An empirical investigation into programming language syntax. ACM Transactions on Computing Education (TOCE) 13, 4 (2013), 19.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Phillip Merlin Uesbeck, Andreas Stefik, Stefan Hanenberg, Jan Pedersen, and Patrick Daleiden. 2016. An empirical study on the impact of C++ lambdas and programmer experience. In Proceedings of the 38th International Conference on Software Engineering. ACM, 760--771.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Mikus Vanags and Rudite Cevere. 2018. The Perfect Lambda Syntax. Baltic Journal of Modern Computing 6, 1 (2018), 13--30.Google ScholarGoogle ScholarCross RefCross Ref
  27. Jeremiah Willcock, Jaakko Järvi, Doug Gregor, Bjarne Stroustrup, and Andrew Lumsdaine. 2006. Lambda expressions and closures for C++. Feb 26 (2006), 06--0038.Google ScholarGoogle Scholar

Index Terms

  1. An Exploratory Study Towards Understanding Lambda Expressions in Python

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Other conferences
      EASE '20: Proceedings of the 24th International Conference on Evaluation and Assessment in Software Engineering
      April 2020
      544 pages
      ISBN:9781450377317
      DOI:10.1145/3383219
      • General Chairs:
      • Jingyue Li,
      • Letizia Jaccheri,
      • Program Chairs:
      • Torgeir Dingsøyr,
      • Ruzanna Chitchyan

      Copyright © 2020 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 April 2020

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • short-paper
      • Research
      • Refereed limited

      Acceptance Rates

      Overall Acceptance Rate71of232submissions,31%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader