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.
- Anwar Alqaimi, Patanamon Thongtanunam, and Christoph Treude. 2019. Automatically Generating Documentation for Lambda Expressions in Java. arXiv preprint arXiv:1903.06348 (2019).Google Scholar
- Hendrik P Barendregt et al. 1984. The lambda calculus. Vol. 3. North-Holland Amsterdam.Google Scholar
- 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 ScholarCross Ref
- Mary Campione and Kathy Walrath. 1998. The Java Tutorial: Object-Oriented Programming for the Internet (Book/CD). Addison-Wesley Longman Publishing Co., Inc.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarCross Ref
- Mark Lutz. 2013. Learning python: Powerful object-oriented programming. " O'Reilly Media, Inc.".Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Ben Shneiderman. 1980. Software psychology: Human factors in computer and information systems. (1980).Google Scholar
- Andreas Stefik and Susanna Siebert. 2013. An empirical investigation into programming language syntax. ACM Transactions on Computing Education (TOCE) 13, 4 (2013), 19.Google ScholarDigital Library
- 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 ScholarDigital Library
- Mikus Vanags and Rudite Cevere. 2018. The Perfect Lambda Syntax. Baltic Journal of Modern Computing 6, 1 (2018), 13--30.Google ScholarCross Ref
- 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 Scholar
Index Terms
- An Exploratory Study Towards Understanding Lambda Expressions in Python
Recommendations
On the use of lambda expressions in 760 open source Python projects
ESEC/FSE 2019: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software EngineeringLambdas as anonymous functions have gained significant prominence in programming languages such as Java, C++, Python and so on as developers tend to use them. With the dominant use of Python as backend language in many projects and large number of open ...
Web development with python and django (abstract only)
SIGCSE '12: Proceedings of the 43rd ACM technical symposium on Computer Science EducationMany instructors have already discovered the joy of teaching programming using the Python programming language. Now it's time to take Python to the next level. This workshop will introduce Django, an open source Python web framework that saves you time ...
Comments