Maybe they don’t have a standalone thing like “x” : y, and so array-like 
definition with colons becomes a dict

Uko

On 03 Jun 2014, at 03:22, Sven Van Caekenberghe <s...@stfx.eu> wrote:

> So Apple has a new language
> 
> https://developer.apple.com/swift/ 
> 
> which is quite interesting since it works on top of their Objective-C 
> runtime, which is pretty similar to what we are used to. There is of course 
> lots of syntactic sugar to make things look easy, and more typing.
> 
> I am still digesting it, but one thing that I wonder is how they implement 
> the literal syntax for simple collections:
> 
> [ 1, 2, 3 ] for an Array
> 
> and
> 
> [ "x" : 1, "y" : 2 ] for a Dictionary
> 
> how do they differentiate between the two ?
> 
> Maybe if we knew, it could be a solution to our 'missing' dictionary literals.
> 
> Sven
> 
> 
> 
> 


Reply via email to