Re: [Fwd: Re: Functional Programming in the Larger or Functional Oriented Software Engineering]

"Carl Eastlund" <[email protected]> Thu, 29 Mar 2007 16:33:19 -0400
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
On 3/29/07, Matthew Swank <[email protected]> wrote:
> What if resources aren't cheap, or I have to manage my own memory.  Is
> avoiding mutation still practical?

Off the top of my head: in many cases, those two restrictions may
actually make immutable data structures more desirable, not less.
More persistent data means less data copying and thus less time/space
resources used.  And immutable data is an extra data invariant that
can sometimes simplify memory management; I certainly don't see how it
would complicate it.

In the end, I think the impact of slim resources or restricted memory
management options on the choice of mutable/immutable data will be
very circumstance-dependent.  Even if I spent more time thinking about
it, I would be hesitant to give a universal answer.  Nonetheless, I
expect immutable data structures to win out in the analysis far more
often than they are actually used.

-- 
Carl Eastlund