Hacker News new | ask | show | jobs
by superuser2 4305 days ago
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?

3 comments

> 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.

I fail to see how.
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.