4 ms·
>the syntax is a lot simpler and the flexibility is less too. The expressions are far from being equivalent. The Objective-C expression specifies what kind of
by trhway 11y ago
>the syntax is a lot simpler
and the flexibility is less too. The expressions are far from being equivalent. The Objective-C expression specifies what kind of dictionary interface and implementation will be there, where is the Swift's versions says there will be just Swift's map. Ability to manage implementation may for example start to matter once you're off beaten path - like large number of items, high concurrency or some very specific requirements on life cycle, memory or performance or you want/have to exploit very specific type/set of keys. Though in mainstream case general standard implementation is probably just fine. Everybody chooses their own poison.