News for hackers. Stuff that matters.
Re:Swift 3.0 Unsafe World by masklinn on Wednesday September 28, 2016 @05:32AM (#12596434)
> 2. RC lets you easily determine when there is only one reference to an object. This enables Swift's collections to be value types, one of Swift's key semantics.

It also enables some optimisations e.g. Python has immutable strings, but CPython can take advantage of rc=1 to extend strings in-place (avoiding accidentally quadratic concatenation loops until you start storing intermediate references or you try to run the software on alternate implementations)

There are no comments on this comment yet.