[OT] Swift - Apple Developer
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
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 <sven@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
participants (2)
-
Sven Van Caekenberghe -
Yuriy Tymchuk