DEV Community

Discussion on: De-throning the List: Part Deux

Collapse
 
robinheghan profile image
Robin Heggelund Hansen

This seems to be an immutable wrapper over regular js arrays, which is what the 0.19 implementation uses under the hood. Thanks for the link, though!

Collapse
 
carstenk_dev profile image
Carsten

yes it is - and it's IMO exactly the thing to do - at least for purescript where FFI is a primary concern (yes I know Elm is moving away from anything similar - that's why purescript might get more interesting for people who want/need more that ports)

Thread Thread
 
robinheghan profile image
Robin Heggelund Hansen

Different use cases. The thing you linked to will have horrible write performance for large arrays.

Thread Thread
 
carstenk_dev profile image
Carsten • Edited

that's probably why there are the warnings at the very top ;)

if you want performance then probably finger-tree approaches (pursuit.purescript.org/packages/pu... ) are sensible ... it of course all depends on what you are trying to do

Thread Thread
 
robinheghan profile image
Robin Heggelund Hansen

Finger trees are cool, but no replacement for a proper immutable array implementation, and they’re not general purpose enough to be the default.