4 ms·
No one does immutability with copying, that would be a joke. There is also nothing tricky about not copying full lists on append at userland lib, just more adva
by elmigranto 10y ago
No one does immutability with copying, that would be a joke. There is also nothing tricky about not copying full lists on append at userland lib, just more advanced data structures.
Yes, it won't be as fast in modifying. But it will be a lot faster in other operations, so it's a trade off and you chose appropriately for your use case.
Plus, it's a lot easier to read and understand "immutable code".