David Porkka

55%
Flag icon
A disadvantage of functional programming is certain problems are easier to conceptualize with state. For example, it is simpler to conceptualize designing a user interface with global state than a user interface without global state. If you want to write a program with a button that toggles a picture between being shown to the user and being invisible, it is easier to think about how to create such a button by writing a program with global state. You could create a global variable that is either True or False that hides or reveals the picture, depending on its current value. It is harder to ...more
The Self-Taught Programmer: The Definitive Guide to Programming Professionally
Rate this book
Clear rating
Open Preview