3 ms·
This seems like less of an argument against functional languages and more like an argument that functional languages aren't going to magically make your program
by kmicklas 10y ago
This seems like less of an argument against functional languages and more like an argument that functional languages aren't going to magically make your program concurrent. Which is basically true. Despite crappy concurrency infrastructure in most all languages, at scale the hard part is always making the underlying algorithm parallelize well.
- spion 10y agoThe big win from FP languages isn't parallelisation, its the lack of shared mutable state. Shared mutable state is the bane of all software: the more you have of it, the less you are able to reason about your program's behaviour. Its not an all or nothing thing (a little shared mutable state is better than a lot), and the difficulty increase is probably not linear either; this is why hybrid languages also help. I don't know why the material for learning FP languages is so bad, but I would guess its the math roots. Most math material is really bad in the sense that it requires that you turn off parts of the brain that are normally useful and helpful, but in the case of math are actually just harmful. (e.g. the part of the brain that continuously looks for "real world" examples of the patterns its seeing i.e. it tries to find X in "this looks like X". Often times, there simply are no useful "real world" values for X and thats okay) My hopes are with Reason (http://facebook.github.io/reason/ http://facebook.github.io/reason/). It takes all the best parts of OCaml: lightning fast runtime great realtime GC strict evaluation with predictable performance excellent module system algebraic datatypes objects and polymorphic variants compiles to JS cleanly via bucklescript not completely crazy about purity great type inference (there is *almost* no need to write down any types) and puts a simple JS-like syntax on top of that. With multicore support right behind the corner, I think it has a good chance of taking over.