Travis Griggs <> writes:

>> On Jun 5, 2014, at 1:14, Alain Ketterlin <> wrote:
>> Swift's memory management is similar to python's (ref. counting). Which
>> makes me think that a subset of python with the same type safety would
>> be an instant success.
> Except that while you don't need to regularly worry about cycles in
> python, you do in swift.

Right. You can't just ignore cycle in Swift.

> Which means you get to think constantly about direct and indirect
> cycles, figure out where to put weak stuff, when to use a local to
> keep a weak property alive until it finds it's strong home, etc.

Well, I don't consider this a bad trade-off. Deciding which refs are
weak and which are strong, or even designing an explicit deallocation
strategy, are design decisions.

-- Alain.

Reply via email to