3 ms·
can you clarify how value semantics are costly compared to garbage collection/explicit pointers?
by q2 12y ago
can you clarify how value semantics are costly compared to garbage collection/explicit pointers?
- Dewie 12y agoAs far as I understand, and if no extra care is taken on the part of the programmer: the extra copying, since you would have to copy over the data from one variable to another instead of just using and moving around pointers. In Parasail's case, you can choose to use "move" (move value from left side to over to the right side) and "swap" (swap the values of the left and right side), which will avoid the copying.