Re:Why functional programming?
by jetru on Tuesday December 24, 2013 @02:59PM
(#6960892)
Don't the compilers optimize this? I always believed functional programming to be popular among compiler experts because it's easier to write certain optimizations on a program because of it's many properties like state not changing etc. I don't know if this leads to realistically faster programs in real life.
[ Parent
| on HN ]
Re:Why functional programming?
by yetanotherphd on Tuesday December 24, 2013 @03:35PM
(#6961042)
That is just theory. In practice, it is going to be very hard for the compiler to know, at the time that you change a single value in a huge array, that you are never going to refer to the old array, and so it can just mutate the array.