[Swift-devel] apple swift language
Ketan Maheshwari
ketan at mcs.anl.gov
Mon Jun 2 22:56:37 CDT 2014
Interesting looking features from this thread on Reddit:
http://www.reddit.com/r/programming/comments/274t5s/apple_swift_programming_language_unveiled
Statically typed with type inference.
Generics.
Closures.
No exceptions.
Extension methods.
Properties (syntax similar to C#), including lazy properties with the
"@lazy" annotation.
Functions, methods and type (static) methods.
Support for observers (with "willSet" and "didSet"). Interesting to see the
observer pattern baked in a language although I'm more partial to event
buses for this kind of thing.
Enums.
Classes and structures (structures have restrictions regarding inheritance
and other things).
For and while loops (statements, not expressions).
"mutating" keyword.
Named parameters.
Deinitializers (finalizers).
Protocols (interfaces).
Optional chaining with "a?.b?.c" and forced dereference with "!."".
Convenient "assign and test": "if let person = findPerson() ...".
Type casting with "is", down casting with "as?" (combines nicely with the
"let" syntax. Ceylon does it right too).
On Mon, Jun 2, 2014 at 8:26 PM, Tim Armstrong <tim.g.armstrong at gmail.com>
wrote:
> We had an off-list thread about this - the site went down due to load
> pretty soon after it announced and only got back online thanks to David
> Kelly moving it to a bunch of AWS servers.
>
> - Tim
>
>
> On Mon, Jun 2, 2014 at 8:03 PM, Scott Krieder <skrieder at iit.edu> wrote:
>
>> swift-lang.org is probably worth a lot of money now!
>>
>>
>> http://www.cnet.com/news/apples-new-swift-coding-language-hopes-to-lock-down-errors/
>>
>> --
>> Scott J. Krieder
>> C: 419-685-0410
>> E: skrieder at iit.edu
>> http://datasys.cs.iit.edu/~skrieder/
>>
>> _______________________________________________
>> Swift-devel mailing list
>> Swift-devel at ci.uchicago.edu
>> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>>
>>
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20140602/d41c726e/attachment.html>
More information about the Swift-devel
mailing list