Well that all depends on the size of kf vs ki and the practical limit of n, now doesn't it?
Name:
Anonymous2010-05-23 4:30
It seems you have been brainwashed by Clojure morons. Even looking at the most pure functional languages, Haskell has mutable arrays via monads1 and Clean has mutable arrays via uniqueness typing2.
Purely functional is theoretically beautiful, but it's not the most practical. A good mix of functional and imperative with some facilities for abstracting syntax is most preferable for me.
>>4
Purely functional means exactly what it says: every procedure expresses a mathematical function. The property you must give up for O(1) array lookup and update is persistence.
>>6
Why do you imply your making a point with your italics when you have not made a point.
Name:
Anonymous2010-05-23 7:24
I like functional programming because it allows me to guarantee the functioning of pure functions for as long as I understand the underlying logic. I can then spend the rest of my time figuring out mistakes in the impure functions or learning about how to optimize the software from naive implementations to more efficient ones.
>>9
Yes, that's the advantage of functional programming, but OP isn't talking about functional programming, but the radical form of functional programming called purely functional programming which rejects the imperative paradigm in full.
Name:
Anonymous2010-05-23 13:40
>>6
No, the property you must give up for O(1) array update is persistence, which is almost always (but not always) necessary for pure functional behavior.
>>10
I see. That's kind of stupid as it would be impossible to interact with that kind of software. Nothing could possibly enter data into the software after interpretation and nothing could possibly receive the results of the calculation. Oh, I see now, IHBT, GJ >>1-sama.