[deleted]
It turns out that this is a different language. Apple overloaded the name "Swift".
The Swift Programming Language
491–500 of 970 posts
Re: The Swift Programming Language
#492As 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…
It has it all [1]: static typing, type inference, explicit mutability, closures, pattern matching, optionals (with own syntax! also "any"), generics, interfaces, weak ownership, tuples, plus other nifty things like shorthand syntax, final and explicit override...
It screams "modern!", has all the latest circlejerk features. It even comes with a light-table/bret-victor style playground. But is still a practical language which looks approachable and straightforward.
Edit: [1]: well, almost. I don't think I've caught anything about generators, first-class concurrency and parallelism, or tail-call optimization, among others.
Re: The Swift Programming Language
#493Re: The Swift Programming Language
#494Earlier quoted context omitted.
> So if Apple's goal was to get new devs into the iOS world, at least > from 10k feet, it's working They just announced Swift, at a conference for Apple developers, with live streaming that is only easily accessed from an ios device. I think it is probably premature to pop the corks and celebrate the efficacy of the get new developers initiative.
Well; based on the promise of immediate inclusion in the app store and a very well thought out book about the language available for free I'd say they're doing rather well so far already.
Re: The Swift Programming Language
#495I found the notion of "Optionals" surprising and a bit hard to handle at first. In Objective C it was really easy to lazily allow values to be nil and still do things on them, so it's a bit of a departure. Thinking about it a bit longer, is it because of the clear distinction between non nullable values ans optionals that the compiler can optimise the code so much more ? (I am thinking about the xx times faster than…
Re: The Swift Programming Language
#496Earlier quoted context omitted.
You can actually read the language reference with a "standard browser": https://developer.apple.com/library/prerelease/ios/documenta...
Hmm, can't seem to change page in Chrome. In Firefox, it works slightly better but still doesn't really. I'm guessing it only works on Safari? How can they release a language and not have proper documentation that is accessible by anyone? It'd be great if someone could get the book, convert it to PDF and post it online.
Re: The Swift Programming Language
#497"...we wondered what we could do without the baggage of C." Is that tongue in cheek? It's not even a particularly large, encumbered language, C.
Heartbleed. Majority of all SSL keys on the internet compromised. All ~2 billion of humans on the internet required to change their passwords due to a single mistake by a single programmer using C. That's billions of human beings wasting hours either changing all their passwords or having their money, identities, medical records, and more stolen because they didn't. Having their accounts hijacked. For all we know tot…
I'm looking forward to seeing your new operating system and managed runtime written entirely using garbage-collected languages!
Re: The Swift Programming Language
#498Re: The Swift Programming Language
#499"The company says that Swift apps are significantly faster than Objective-C apps, outperforming them by over 93x." With a graph showing ObjC at 127x faster than Python, Swift 220x faster than Python. Thus the conclusion is 220 - 127, Swift is 93x faster than ObjC. Someone needs to resit their GCSEs.
"93x faster" sounds roughly like a 46.5x improvement in marketing.
Re: The Swift Programming Language
#500I found the notion of "Optionals" surprising and a bit hard to handle at first. In Objective C it was really easy to lazily allow values to be nil and still do things on them, so it's a bit of a departure. Thinking about it a bit longer, is it because of the clear distinction between non nullable values ans optionals that the compiler can optimise the code so much more ? (I am thinking about the xx times faster than…