Live data from Hacker News

The Swift Programming Language

developer.apple.com

221–230 of 970 posts

Re: The Swift Programming Language

#225

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";

You say "Apple syntactic craziness", but "var" is identical to JS, et. al. and "let" is identical to ML, et. al.

The string interpolation syntax is unique, but kind of makes since given then \ is the escape character in C strings.

Re: The Swift Programming Language

#226
post #93

It seems like the only way to view the programming language documentation is on iBooks on an iOS device? For a programming book, this is ridiculous. Edit: The latest version of OS X does support iBooks. Lets hope you have that.

Posted the direct epub dl here: https://news.ycombinator.com/item?id=7835420

Re: The Swift Programming Language

#227
post #2

As someone who always disliked Objective C, I think Swift looks very promising. I'll check it out right away :) Software-wise, I feel these current WWDC announcements are the most exciting in years. Looking at the Swift docs right now, I can see many interesting inspirations at work: there's some Lua/Go in there (multiple return values), some Ruby (closure passed as the last argument to a function can appear immediat…

He mentioned the desire to drop the "C" from objective-c, but I'm curious what this means for using c/c++ libraries now. Do they need to be wrapped by objective-c before being visible in swift?

I suspect that as long as it compiles to LLVM, anything goes.

Re: The Swift Programming Language

#228
The `enum` part of the language seems to be Haskellish algebraic types - like you can have enum "cases" with parameters in addition to just named enumerations .. and these enums can have methods. Cool!
Post reply on HN