4 ms·
I wish they would stop calling those data structures functional. Just call them immutable. It's the other way around. Functional languages use immutable data st
by Uchikoma 15y ago
I wish they would stop calling those data structures functional. Just call them immutable. It's the other way around. Functional languages use immutable data structures. One can use those "functional"data structures with any programming paradigma (not sure how to use them in Prolog though).
- william42 15y agoWith prolog you can have tree(Left,Value,Right) and such. http://everything2.com/title/Binary+search+trees+in+Prolog#William42 http://everything2.com/title/Binary+search+trees+in+Prolog#W...
- silentbicycle 15y agoCalling them "persistent data structures" is probably more useful. Prolog has "difference lists", which are (currently) pretty unique to Prolog. Its special case of variables that can be mutated, but only once, has interesting implications.
- Uchikoma 15y agoI agree, persistent data structures is the better term.
- me2i81 15y agoOkasaki called them that because he was implementing data structures in pure functional languages, so in that context it was reasonable. But in imperative languages, you're right, calling them "purely functional" is meaningless.