We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Strategies for Working with 'Null' in Elixir and Other Functional Languages
117
clicks
Source: youtube.com
Evelyn Masso's talk deals with the treatment of 'null', a common language feature denoting an absence of a value. 'null' can be termed differently in various languages, such as 'nil' in Elixir or 'none' in Python, among others. While beneficial for indicating that something could be present but isn't, using 'null' also raises challenges, such as representing different 'absences' meaningfully, refactoring, and future-proofing data models. She outlines situations where 'null' usage is appropriate, such as in optional values or to replace special cases denoted by sentinel values in data structures. On the flip side, avoiding 'null' makes sense when multiple 'absence' cases must be distinguished for accurate data representation, prompting the use of explicit enum cases or default values. Masso emphasizes the importance of thoughtful decision-making around using 'null' or investing in a more robust initial data model, acknowledging that there are trade-offs in terms of development speed and data model complexity.
Related posts
© HashMerge 2024