Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Compiler is a good example of big program that's suitable for functional programming. You have specified input and output, no need for interactivity, and you can localize all mutations of state in one place (writing generated files to disk).

Other batch processing programs works as well.



This is true. I'm currently working on a research compiler targeting GPUs. It's 7500 lines of Haskell with all comments and blank lines removed, and the only impure part is the command line interface. Avoiding IO is not really painful for these kinds of programs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: