News for hackers. Stuff that matters.
Re:Why functional programming? Why Haskell? by _delirium on Saturday August 10, 2013 @09:14AM (#6190985)
For scalar types I agree, but now that I think of it, I'm not sure it's even possible to write array code using them, unless I'm missing something. If you can't modify the array in-place or write to a provided "output" parameter, and you can't malloc a fresh array to return (because that's a side effect), how do you write a pure function of type int[] -> int[] at all?

The nice thing about Haskell is that it conceptually mallocs a fresh array to return, but then optimizes away the intermediate array in a lot of cases.

There are no comments on this comment yet.