3 ms·
> Almost nothing has carried over to what companies use or want day to day I wonder what is your view on functions and local variables? Do you find structuring
by js8 5y ago
> Almost nothing has carried over to what companies use or want day to day
I wonder what is your view on functions and local variables? Do you find structuring programs with them useful or just an academic exercise?
I had the "privilege" to work with assembler programs, written in 1970s and 1980s, that were mostly one big procedure, with a huge bunch of shared global variables. Back then, it was very efficient way to program (that's why it was used), and down to metal. But it was unmaintainable mess.
(And that's what we want from a compiler - to transform program from maintainable and somewhat abstract description down to unmaintainable spaghetti that can be, however, executed very efficiently.)
Pure functional programs are just taking it step further, saying that most functions shouldn't need full access to their execution environment (operating system). The result is, supposedly, even more maintainable programs.