Re:Disadvantages of purely functional programming
by majewsky on Sunday June 05, 2016 @01:16PM
(#11841943)
> benchmarks or code are nowhere to be seen
> The author [...] links to code that other people have written
Re:Disadvantages of purely functional programming
by Mathnerd314 on Sunday June 05, 2016 @01:35PM
(#11842050)
> there was never a situation when I said to myself "if only Data.HashMap (unordered-containers) was faster"
Here's a Haskell programmer looking for a faster hashmap: https://github.com/ndmitchell/shake/issues/418
Shake in fact does use reified generics (a.k.a. Dynamic/Typeable) and a Value type, and recommends disabling idle GC. I'm not sure if there's a "GC write barrier", Shake just uses MVar locks.
Re:Disadvantages of purely functional programming
by TheCoelacanth on Sunday June 05, 2016 @01:27PM
(#11842016)
It's also setting a very high bar for functional languages to clear. Off the top of my head I can't even name a garbage collected language that has reified generics and value types.
There's plenty of words and claims are made but benchmarks or code are nowhere to be seen. Why should anyone take these claims at face value?
> Furthermore, most functional programming languages (OCaml, Haskell, Scala) are incapable of expressing a fast generic mutable hash table because they lack the killer combo of: reified generics, value types and a fast GC write barrier.
Sounds plausible? Maybe. Incapable is a strong word. I'm not an expert on mutable hash-tables so I don't know for sure. If I was making a claim that you can't implement mutable hash table without 2 square feet of badger fur and a pound of whale fat would you believe me? I would like to see a citation.
I have written a lot of Haskell and there was never a situation when I said to myself "if only Data.HashMap (unordered-containers) was faster". Just make sure you're using the right tool for the job (which might not be Haskell).
The author doesn't seem to write any code himself but instead links to code that other people have written and then makes claims about F# being better (I can't find the F# solution to parallel quicksort from one of the linked posts). I see very little value in that.