Transactional Memory, localized procedural programming, etc

bearophile bearophileHUGS at lycos.com
Fri Jan 2 14:11:31 PST 2009


According to this article, the only hope for the future of efficient programming is going all the way toward immutable data (with a functional programming style, I presume):

http://enfranchisedmind.com/blog/2009/01/02/the-problem-with-stm-your-languages-still-suck/

I don't know much still about this topic, but I think a compromise solution may be possible/better: the whole global program may be purely functional, where all data/objects are essentially immutable. But there can be kernels (generally methods/functions) that are mostly meant to run on a single CPU for a short time that inside use locally mutable data and procedural code (they can be like pure functions in D2). I think today there are no languages that allow this, designed for this type of mixed programming (If you know of a language like that please tell me. I think Scala and F# are different).

Can D2 be programmed like that? Probably not, it requires a different kind of compiler (able to compile typical FP constructs more efficiently), and a different mindset for the programmer.

Bye,
bearophile



More information about the Digitalmars-d mailing list