[OT] Apple introduces Swift as Objective-C sucessor
Brad Anderson via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 2 15:03:43 PDT 2014
On Monday, 2 June 2014 at 19:19:27 UTC, Paulo Pinto wrote:
> Just thought it would be nice to give a heads up about Apple's
> plans to replace Objective-C in the long run.
>
> The language was presented today at the WWDC Keynote, looks
> like Ruby, uses ARC alongside the Objective-C runtime.
>
> http://live.arstechnica.com/apples-wwdc-2014-keynote/
>
> It also has a nice REPL experience, similar to Python's
> worksheets in IPython.
>
> --
> Paulo
I like how the lambdas can omit the parameters then reference
them by special $0, $1, etc (e.g., { $0 < $1 }). It reminds me of
our string lambdas ("a < b") in brevity without the hacky feel
those had. As much as I like the new lambda syntax I still miss
how short string lambdas could be.
arr.sort!"a < b"();
arr.sort!((a, b) => a < b);
Maybe something like...
arr.sort!( => $0 < $1 )
...could be supported. Not a huge improvement but I like it
anyway.
More information about the Digitalmars-d
mailing list