Re:Reason 3
by christophilus on Friday October 27, 2017 @10:50PM
(#15573740)
I guess I'm thinking more along the lines of Clojure(Script) which has efficient immutable lists, vectors, and maps. It doesn't do a full copy every time you do a cons or assoc. It seems to me that PureScript would really benefit from having something similar baked in.
[ Parent
| on HN ]
Re:Reason 3
by wereHamster on Saturday October 28, 2017 @05:13AM
(#15574514)
It does have efficient maps (purescript-maps) and listss (purescript-lists). Couldn't find any package which provides a Vector type that is not optimised specifically for math operations which always operate on the whole vector (multiply, add, dot product etc).
Re:Reason 3
by christophilus on Saturday October 28, 2017 @10:53AM
(#15575305)
Ah. Right. My impression was that most PureScript code just uses plain JS objects / arrays, though. Is that not correct? If the ecosystem isn't built around the efficient immutable data types, much of the advantage disappears.