The Swift Programming Language
271–280 of 970 posts
Re: The Swift Programming Language
#272I 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/
Re: The Swift Programming Language
#273Slightly disappointed that I won't be able to try it out yet, because I'm not a Mac Developer. I can't get the XCode 6 beta without it, so I'd have to cough up $99 to try a new language... It seems to me like that might hurt its adoption.
Re: The Swift Programming Language
#274Looks like C# with .NET Native, some sort of. Playground is interesting.
Re: The Swift Programming Language
#275Feels 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";
The language itself isn't radically different from most mainstream Algol style languages. That's good because it makes it pretty easy to pick up. In addition to what you mention on variables vs constants, the only feature which is nice seems to switch-cases. a. No fall through. This is a plus in avoiding bugs. This is minus if you really know what you are doing and want fall throughs b. Pattern Matching in case state…
Re: The Swift Programming Language
#276So it looks like the language isn't open source and won't target non-Apple runtimes? I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.
Re: The Swift Programming Language
#277Re: The Swift Programming Language
#278It 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.
Re: The Swift Programming Language
#279So it looks like the language isn't open source and won't target non-Apple runtimes? I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.
I've uploaded it just now
Re: The Swift Programming Language
#280a better version of ipython notebook!