kj
2010-10-25 00:28:41 UTC
I don't use functional programming much in my work, and in fact I
know little about it. But I find the idea of controlling and
minimizing side effects attractive. (It is my understanding that
this is one of the features of functional programming.)
I am currently in the early stages of implementing a data
management/analysis/visualization system. This system is supposed
to make it easy for users to manage and manipulate large datasets
(typically dense multidimensional arrays of measurements).
I would like to design the system so that these large data objects
are immutable once created (the reason for this is that I think it
will be easier to implement a system that maitains data integrity
if I minimize the mutability of these objects). Making these
typically large objects immutable means that all manipulations of
these objects (e.g. extracting data subsets, transforming datasets,
combining datasets) would all require creating new objects, rather
than transforming existing objects in-place.
One major concern, of course, is that such a scheme would require
a lot of memory. At minimum it would require pretty aggressive
garbage collection. What other techniques are used in functional
programming to cope with such heightened demands on memory?
TIA!
~kj
know little about it. But I find the idea of controlling and
minimizing side effects attractive. (It is my understanding that
this is one of the features of functional programming.)
I am currently in the early stages of implementing a data
management/analysis/visualization system. This system is supposed
to make it easy for users to manage and manipulate large datasets
(typically dense multidimensional arrays of measurements).
I would like to design the system so that these large data objects
are immutable once created (the reason for this is that I think it
will be easier to implement a system that maitains data integrity
if I minimize the mutability of these objects). Making these
typically large objects immutable means that all manipulations of
these objects (e.g. extracting data subsets, transforming datasets,
combining datasets) would all require creating new objects, rather
than transforming existing objects in-place.
One major concern, of course, is that such a scheme would require
a lot of memory. At minimum it would require pretty aggressive
garbage collection. What other techniques are used in functional
programming to cope with such heightened demands on memory?
TIA!
~kj