OT: This Swift thing

Alain Ketterlin alain at dpt-info.u-strasbg.fr
Fri Jun 6 04:25:57 EDT 2014


Travis Griggs <travisgriggs at gmail.com> writes:

>> On Jun 5, 2014, at 1:14, Alain Ketterlin <alain at dpt-info.u-strasbg.fr> 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.



More information about the Python-list mailing list