Comparing Id and Haskell in a Monte Carlo photon transport code
- 1 January 1995
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 5 (3) , 283-316
- https://doi.org/10.1017/s0956796800001374
Abstract
In this paper we present functional Id and Haskell versions of a large Monte Carlo radiation transport code, and compare the two languages with respect to their expressiveness. Monte Carlo transport simulation exercises such abilities as parsing, input/output, recursive data structures and traditional number crunching, which makes it a good test problem for languages and compilers. Using some code examples, we compare the programming styles encouraged by the two languages. In particular, we discuss the effect of laziness on programming style. We point out that resource management problems currently prevent running realistically large problem sizes in the functional versions of the code.Keywords
This publication has 6 references indexed in Scilit:
- Performance Studies of Id on the Monsoon Dataflow SystemJournal of Parallel and Distributed Computing, 1993
- Experiences with compiler-directed storage reclamationPublished by Association for Computing Machinery (ACM) ,1993
- A gentle introduction to HaskellACM SIGPLAN Notices, 1992
- Report on the programming language HaskellACM SIGPLAN Notices, 1992
- Effects of Changing the Random Number Stride in Monte Carlo CalculationsNuclear Science and Engineering, 1991
- Particle-transport simulation with the Monte Carlo methodPublished by Office of Scientific and Technical Information (OSTI) ,1975