[Fwd: Re: Functional Programming in the Larger or Functional Oriented Software Engineering]
Matthew Swank <[email protected]> Thu, 29 Mar 2007 15:16:16 -0500
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
Joe Marshall wrote: > I've also debugged a lot of complex programs. *Many* *many* bugs > are the direct result of someone modifying something that someone > else didn't expect to be modified. Large complex systems spend > a huge amount of time copying structure to protect themselves from > accidental mutation. Look at a large system coded in Python and > see how much time it spends in deep-copy. > > Given how many bugs and kludges I've seen to work around bugs > in a stateful system, and given that I've seen a number of large > complex systems that are state-free (and simply *cannot* exhibit > state-associated bugs), I've started to rethink this idea of `state > is bad'. I'm coming to the conclusion that state is *far* worse > than most people think, and even the rabid Enemies of State > are underestimating it. > > On the other hand, I don't think `world-passing-style' (monads) > are the solution, either, so I'm not quite ready to jump on > the absolutist platform. ..... > > Now it may be the height of wastefulness to tell people that if they > if they want to change the color of their car that painting is not an > option --- they must purchase a brand new car of the correct color, > but if you have the resources (if cars are cheap or free), this really > isn't such a bad option. > What if resources aren't cheap, or I have to manage my own memory. Is avoiding mutation still practical? Matt -- "You do not really understand something unless you can explain it to your grandmother." - Albert Einstein. -- "You do not really understand something unless you can explain it to your grandmother." - Albert Einstein.