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