Hacker News new | ask | show | jobs
by DAddYE 4295 days ago
Hey guys, do you know if swift will be ever open-sourced? After the WWDC they said that was early to think about it while in beta. So, what's the status now?
4 comments

Open-sourcing it would be really cool to see. Chris Lattner last said he wasn't sure if they were going to open source it (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073698....)
Yep, we damn need a bit of more competition within bigs, right now seems just between Google and Mozilla (for the type of language).
C# is in front of all three in mobile space (it compiles to native of course).

C# is the only language that is both modern and spans all major mobile platforms.

http://en.wikipedia.org/wiki/Xamarin

Sure. But Xamarin is hardly open-source, and what OP was looking for was a open-sourced tool-chain & stack for mobile development.
You can't even build Xamarin's sample project without demoing a commercial license, because the sample project is falls outside the app size restriction.
Except you are forgetting C++11 is supported in all mobile SDKs, with C++14 appearing in upcoming versions.

Personally I consider C++14 quite modern.

Considering the minuscule market share that Windows Mobile currently has, C# is close to nonexistent on mobile as of today.
Unity3d alone completely invalidates this claim.
Are there many apps written in Unity? Or is it only games?
I think at this point we also have facebook embracing D ?
What competition?!? Until either of them support their languages on their respective OSs there isn't any competition.
I think without the supporting runtime libraries also being open-source, there isn't any point in open-sourcing the language is there?

I mean, look at GNUStep. Not widespread adoption.

Actually there is. One of the big selling points of Go is its ability to produce self contained binaries. Swift would share this but also be a language that is more full featured.

GNUStep failure is more to do with Objective-C being such an odd language for most people.

All compilers that produce native code are capable of producing static executables and libraries.

This is only a selling point to developers that mix language with implementation, or never used a native code compiler.

Agreed. I gave up following GNUStep back in 2003, the last time I used WindowMaker as my window manager.
Fond memories. I used to use WindowMaker on my old RH 6.2 system (or was it 7?), maybe even Fedora 1. But I never understood the dock - I was expecting a Windows-style task bar and the dock really isn't that.

The fact that it sat beneath other windows meant you had to constantly shift windows to get to it, which I found frustrating. Likely a configuration option?

It probably runs excellently on modern hardware, albeit with no GPU acceleration or anything to reduce main CPU cycles.

Apple opensoucred their Objective-C compiler only because the GPL on the GCC forced them. They invested a lot in the BSD licenced LLVM. I don't think they did this just for fun, but to avoid they have to do that.
You do realise that the clang part of llvm includes the Objective C compiler and it's under the BSD license as well?
What good is the language without its libraries?
Objective gcc came from NeXT. Apple has a problem with GPLv3, not the GPL in general.
Apple has contributed back to a lot of BSD-licensed proyects, as well as released some of their own, so don't be so sure.
Their live feed yesterday was only available on Safari. Isn't it obvious that they want their herd only inside of a barn?
It was streamed in the open HTTP Live Streaming protocol. It just so happens that the only web browser that implements it in Safari. Worked fine in VLC.

Is there any other way to do live streams embedded on a web page without a proprietary Flash plugin?

Hardly open. It'd be like if Google rewrote the Gmail frontend to native dart and then just blamed the other browsers for not having a native Dart VM. Dart is even standardized (by ECMA), unlike HLS which isn't standardized.

Relevant: http://annevankesteren.nl/2010/09/draft-vs-standard

> they want their herd only inside of a barn?

Awesome. Who should I switch to that doesn't want that?

Apple is the most extreme example. I was able to watch Microsoft's live streams in Chrome for example.
To be fair it wasn't even available with Safari for most of it. Brought back memories from keynotes a decade ago where the stream barely worked.
I don't get why this is down-voted. I think it is excellent point.

My thoughts exactly when tried to view the live stream.

Its being downvoted because of the derogatory naming of Apple users.
What is the practical difference if it's open-source or not? It'll still be OSX-native code, and every OSX user has access to it for free anyway.

Or would that enable a Linux port?

> Or would that enable a Linux port?

I would be interested in a Swift port for Linux server-side/command line dev. Not so much client UI dev. Swift on Linux servers could help Apple sell more Macbooks to developers.

But a Linux-based swift compiler would mean some multi-platform devs wouldn't need OS X as much. Bad for Apple.
OCaml, F#, Haskell, Standard ML all with a longer history and (except SML) being used at the industry.

Why bother with Swift in such use case...

Swift seems a pragmatic take on functional programming. Apple backing means the compiler, libs and runtime will get a lot of work.
And Microsoft puts money on F#, Haskell and OCaml, all of which already have better Linux support.

Swift is great for pushing functional programming down the throat to mainstream developers that wish to target iOS, but it is no more pragmatic than OCaml or F#.

For the OP use case, targeting Linux server software is already better served by the languages I mentioned.

> but it is no more pragmatic than OCaml or F#.

Swift seems more approachable then those languages. Pragmatic in the sense that Rust and Kotlin are.

If Apple decides/realizes Swift was a bad idea, you will be out of luck with your codebase. Unlike open source where users can continue the work of the corporation.
It would enable porting to other platforms, and it's also just useful to be able to look at how things implemented. I've benefitted a lot from being able to look at the Objective-C runtime source code, for example, because I can see how things work or where things go wrong.