digitalmars.D - Functional Programming Use Case
- Paul D. Anderson (4/4) Oct 10 2008 At the risk of starting a debate, I found this blog post interesting reg...
- Andrei Alexandrescu (5/12) Oct 10 2008 & de coloribus neither.
- bearophile (5/6) Oct 10 2008 Why use Scala for that job when you can use something modern like OMeta ...
At the risk of starting a debate, I found this blog post interesting regarding the utility of functional programming. http://weblogs.java.net/blog/cayhorstmann/archive/2008/10/know_when_to_fo.html "De gustibus non est disputandum" Paul
Oct 10 2008
Paul D. Anderson wrote:At the risk of starting a debate, I found this blog post interesting regarding the utility of functional programming. http://weblogs.java.net/blog/cayhorstmann/archive/2008/10/know_when_to_fo.html "De gustibus non est disputandum"& de coloribus neither. I like fold (aka std.algorithm.reduce) but probably this is a poor introduction to it and the values of FP. Andrei
Oct 10 2008
Paul D. Anderson: From that blog post:I use Scala to implement the interpreters and compilers because of its nifty “combinator parser” library. (This and this blog have nice introductions into Scala combinator parsers.) Why not just lex and yacc, the Model T of parser generators? My colleague is doing just that, and it is a good thing because it gives students much-needed experience with C programming. But I don't have the heart to see students suffer with pointer errors. With Scala, we can implement an interpreter for a simple language that supports arithmetic, if/else, and closures, in < 150 lines of code.<Why use Scala for that job when you can use something modern like OMeta (like Pymeta https://launchpad.net/pymeta )? Bye, bearophile
Oct 10 2008