Live data from Hacker News

“Swift will be open source later this year”

apple.com

371–380 of 573 posts

Re: “Swift will be open source later this year”

#371
post #11

Nice to see that Chris (Lattner) got his way. I chatted with him last WWDC right after the main Swift technical session, and he expressed the desire to open source it, but had no idea if he could get it through the powers that be. Supporting the standard libraries on Linux is certainly a surprise, though.

Too little too late. Apple could have got my attention if they had done this from the start, but at this point I find it hard to get excited about this. Half the reason I find myself drawn to a new language is the culture and community surrounding it. You might think this seems silly at first glance, they're programming languages, not fraternities. But hear me out. Golang is a pragmatic crowd. Go into #go-nuts on fre…

> Golang is a pragmatic crowd

Why do people keep on saying that? Would people say javascript is for the pragmatic crowd because jsfiddle exists ? no

Go is a badly designed language period. the type system forces devs to write runtime type assertions which should be the job of the compiler thanks to parametric types, if go designers knew one or 2 things about types. The fact that Go dismisses 30+ years of type theory isn't pragmatism. It's ignorance.

Nobody would call PHP pragmatic yet even PHP is more expressive.

Re: “Swift will be open source later this year”

#372
post #226

Earlier quoted context omitted.

Unix. The 'native' language there is C but there are dozens of languages that are well-supported. They can interoperate through OS-level abstractions like pipes and via C APIs on at the process level. The average Unix desktop or server is probably running code written in 5-10 languages, more or less transparently to the user.

> They can interoperate through OS-level abstractions like pipes and via C APIs on at the process level. And you can't do this in OSX or iOS? > The average Unix desktop or server is probably running code written in 5-10 languages, more or less transparently to the user The average iPhone is probably running code written in just as many (if not more) languages - C, C++, Obj-C, Swift, and Javascript are a given before…

Sandboxing is a pretty big modulo.

I actually don't have any opinion on how many languages have 'first-class' support on iOS. My understanding is that it's somewhat more complicated to create natural-seeming bindings from other languages to Objective-C APIs than it would be for C APIs, and that there are restrictions in the type of applications you can distribute using other languages (no downloadable code outside the App Store). Whether that makes those languages not 'first-class' on the platform is up to interpretation.

But the person I was responding to was specifically asking if any platform had first-class support for more than 1-2 languages. I don't know how to determine 'first-class' as a matter of principle, but I assumed that the multiple decades of polyglot software development on Unix environments would count. (OS X would count there, by the way.)

Re: “Swift will be open source later this year”

#373
Will Swift be an ISO or ANSI standard?

Consider that while Objective-C is open source, Objective-C 2.0 was produced without any effort at all at standardization.

I attended the 2008 WWDC. One of Apple's engineers was demonstrating Objective-C++ and actually said "You can freely mix objective-c and c++." I wanted to start screaming, maybe beat him senseless.

I've done quite a lot of Objective-C, and quite a lot of C++ but I'm still not sure I can figure out how to mix the two.

Re: “Swift will be open source later this year”

#374
post #107
post #14

Swift on Rails, who's first :) ? I suspect Heroku are working on preparing for an out of the box build pack, but I guess they don't have access yet since it's out late 2015. At least I hope so, looking for a better Ruby replacement but I still like Rails.

They should call it Swift On Sails.

Please don't, or googling "Swift Sail" won't find me Wind Waker results anymore.

Re: “Swift will be open source later this year”

#375

Will Swift be an ISO or ANSI standard? Consider that while Objective-C is open source, Objective-C 2.0 was produced without any effort at all at standardization. I attended the 2008 WWDC. One of Apple's engineers was demonstrating Objective-C++ and actually said "You can freely mix objective-c and c++." I wanted to start screaming, maybe beat him senseless. I've done quite a lot of Objective-C, and quite a lot of C++…

> I've done quite a lot of Objective-C, and quite a lot of C++ but I'm still not sure I can figure out how to mix the two.

By using Objective-C++. Just name your source file with the .mm extension and Xcode automatically starts compiling it as Obj-C++. If you take Objective-C, remove all the C from it, and take what's left and slap that on C++, that's Objective-C++. And it really does work, and prior to Swift's announcement I thought it was the best approach to doing Cocoa development (because with ARC you can even put Obj-C objects into C++ data structures and do fun things like `std::vector`).

Re: “Swift will be open source later this year”

#376

Nice, Swift just became 10x more interesting to me; especially since it'll run on Linux. A Pythonesque statically typed language server-side could be handy.

Yeah, I agree with this. I'm a Go programmer, but I instantly became interested in learning Swift as a secondary mobile language and might even write an iPhone app.

Re: “Swift will be open source later this year”

#377

Earlier quoted context omitted.

Supporting Linux is a surprise, but I think it's a great move on their part. Think: How many iOS apps are frontends to a server API? And how many of those APIs are running on Linux servers? Swift on Linux means ~all the code for a client-server iOS app can be written in the same language.

The fact that I don't use OSX has been a barrier to getting better at iOS development. Hackintoshing has proven to be quite elusive and the vmware and vbox USB layers in Linux don't convince virtualized OSX enough to transfer over apps to my iDevices. I'm not convinced you can get to high quality by testing strictly on emulators. If anyone has an old mac that can run modern xCode (you probably know what this constitu…

virtualisation of OS X on non Apple OS (and hence hardware) is not allowed by Apple

Re: “Swift will be open source later this year”

#378
post #296
post #259

Earlier quoted context omitted.

Have you tried Go, Scala or Rust? All of those language are from their separate leagues, how can you compare swift with them?

In my experience, in the wide world of programming languages Rust and Swift are really not very far apart. Swift's designers even cited Rust as an influence.

> Swift's designers even cited Rust as an influence.

Specifically, http://nondot.org/sabre/

     > Of course, it also greatly benefited from the
     > experiences hard-won by many other languages in the
     > field, drawing ideas from Objective-C, Rust, Haskell,
     > Ruby, Python, C#, CLU, and far too many others to list.

Re: “Swift will be open source later this year”

#379

Earlier quoted context omitted.

What on earth are you talking about? Parsing a JSON response in Swift is basically the same as it is in Objective C: let parsed: AnyObject? = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments, error:&parseError)

This is truly not meant to be a snarky comment, but why is it so overtly verbose? I left Java years ago b/c it was making my fingers arthritic it seems. It doesn't look like much fun. Sure, IDEs do autocomplete, but still requires parsing by the human eye. I'm sure you get used to it. Every language looks horrible the first time, then you learn to live with it and maybe love it, but on first glance that looks pretty…

Verbosity is part of the design philosophy behind Objective-C.

Re: “Swift will be open source later this year”

#380
post #226

Earlier quoted context omitted.

Unix. The 'native' language there is C but there are dozens of languages that are well-supported. They can interoperate through OS-level abstractions like pipes and via C APIs on at the process level. The average Unix desktop or server is probably running code written in 5-10 languages, more or less transparently to the user.

First, you said with first class support from the vendor. Linux doesn't offer that for any language. Second, that's not an app development platform. Gnome has C (and it's own unholy stack on top), KDE has C++. You can code for OS X/iOS in all kinds of languages too, if you mean at the OS and not at the app development level.

I'm afraid you have me confused with another commenter regarding the 'first-class support' issue.

If "platform" means "app development platform" and that means "full-featured toolkit for the development of GUI applications that run in an integrated environment", then I would agree both that Gnome and KDE fit that bill and that they have limited language support (in my experience the only language worth using with those toolkits other than the respective C and C++ is Python).

Post reply on HN