Hacker News new | ask | show | jobs
by AnimalMuppet 1457 days ago
Not exactly (if I understand the question correctly).

Imperative usually goes with mutation. If I'm willing to do mutation, then I can replace the old value with the new value in the same location, allocating nothing either before or after.

If you want to do immutable with imperative, then yes, you have to allocate sometime.

1 comments

> If you want to do immutable with imperative, then yes, you have to allocate sometime.

Yes that's what I was saying.