Earlier quoted context omitted.
i do, does functional programming make this a non issue? maybe im just not smart enough to wrap my head around it.
Yes and no. In theory, writing in a functional language that allows only "pure" functions (aka. functions w.o. side effects), makes it easier to control state. In practice, side effects exists and are required for programs to do anything useful. In my opinion, one mistake of many purely functional languages was to be so focused on this purity, that it made it needlessly hard to write useful code in them, especially f…
Note that there are many functional languages which don’t care about purity at all: for instance, Scheme, OCaml, SML and Elixir. I get annoyed when people confuse Haskell for the broader paradigm of functional programming. (Even though Haskell is my main programming language!)