2025-10-11 –, Track B(LT-16)
Language: English
While Python's object-oriented paradigm dominates developer discussions, its functional capabilities offer powerful tools for modern development. This talk explores how integrating functional programming (FP) concepts can enhance code readability and maintainability in Python projects. We will discover how to transform imperative logic flow into composable functions and implement declarative error-handling using intuitive railway patterns. This talk aims to provide an optional toolbox for Python developers to improve code quality.
Functional programming (FP) offers powerful tools and is increasingly adopted across modern languages, including Python. Since Python is not a purely functional language, rather than advocating for a complete shift to FP, this talk will demonstrate how to effectively integrate functional techniques, such as pure functions, higher-order functions and Monads, into your Python codebase. By converting imperative procedure-style logic into composable functions, developers can focus more on the "what" (logic) rather than the "how" (implementation details). As for error handling, we will explore how to organize code using a fun and easy-to-understand railway analogy. By the end of this talk, you'll understand how to apply basic FP concepts in Python, which improve code's readability, maintainability, and robustness.
Phd student in biostatistics at CityUHK
Phd student of biostatistics at CityUHK