Live data from Hacker News

The Swift Programming Language

developer.apple.com

161–170 of 970 posts

Re: The Swift Programming Language

#161

Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";

Do you need the semicolons?

[deleted]

Re: The Swift Programming Language

#162
post #84

Still on an Objective-C runtime, so it's hard to see how the performance gains they claim are achievable, but otherwise having an interpreted version should be good for productivity.

Correct me if i'm wrong, but Swift has static typing (with type inference, but still with a strict type on every variable), whereas Objective C has dynamic typing with optional type annotations. Having ubiquitous strong type information available should make it much easier to generate fast code.

Re: The Swift Programming Language

#164

This will revolutionize programming education. Interestingly enough, the time manipulation in Swift was inspired by a game called Braid ( http://en.wikipedia.org/wiki/Braid_(video_game) ) released back in 2009. This will help young programmers solidify the connection between giving the computer logical commands and what is outputted on the screen immediately. Reminds me of how excited I was when Processing ( http://w…

Was it inspired by Braid or the work of Bret Victor at http://worrydream.com?

Re: The Swift Programming Language

#165

Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";

Using the backslash+parens for interpolation is really clever! No more ambiguity like when using % or {}. Is that a Swift original syntax?

Re: The Swift Programming Language

#166
post #156

Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";

[deleted]

I don't get what you don't get. What's strange here?

Re: The Swift Programming Language

#167

I'm impressed that it looks like they're turning Bret Victor's demo into a reality with playground. Check out his demo if you haven't: https://www.youtube.com/watch?v=PUv66718DII Really, really interested and excited about learning Swift.

[deleted]

Re: The Swift Programming Language

#168

I just skimmed the tour, and my impression is: Swift is a compiled, Objective-C compatible Javascript-alike with an ObjC-like object model, generics, and string interpolation. No exceptions. Based on LLVM and appears to inherit the same data structures as Cocoa apps (Dictionaries, Arrays, &c). It feels very lightweight, sort of like an analog to what Javascript is in a browser.

I think it uses the Objective-C runtime directly, so it has access to all the frameworks and Swift classes can be loaded into Objective-C projects as well.

There are a few other languages that do this with the Obj-C runtime, for example a Lisp variant called Nu[0].

[0] http://programming.nu/

Post reply on HN