Why Apple Should Open-Source Swift -- But Won't
snydeq writes: Faster innovation, better security, new markets — the case for opening Swift might be more compelling than Apple will admit, writes Peter Wayner. "In recent years, creators of programming languages have gone out of their way to get their code running on as many different computers as possible. This has meant open-sourcing their tools and doing everything they could to evangelize their work. Apple has never followed the same path as everyone else. The best course may be to open up Swift to everyone, but that doesn't mean Apple will. Nor should we assume that giving us something for free is in Apple's or (gasp) our best interests. The question of open-sourcing a language like Swift is trickier than it looks."
If Apple doesn't want the help of the OSS community then forget 'em.
Why bother crying and begging them to allow you to strengthen their products? If you want to work on Swift then send your resume to Apple.
No one is demanding anything, but some of us believe that distributing your software as free and open source software is better for everyone including the original developer. There's nothing wrong in suggesting it.
There's no shortage of programming languages. Swift isn't anything special. It mostly has value for its integration with Apple's environment and this isn't Open Source either, so what would Swift being Open Source actually be good for? I really can't see why anyone would want to use Swift anywhere than on OS X or iOS when the real value isn't in the language anyway but in the frameworks and the integration with them.
(And I'm not even saying that Apple's approach is better. It's a different approach and has its own advantages and disadvantages. But if you have a closed system using its advantages makes more sense than trying to square the circle.)
In this context it's a programming language for the Objective-C runtime developed by Apple.
I don't know about that necessarily. Some has contributed a nontrivial amount of work to LLVM and especially the clang project. That has certainly been appreciated outside the Applesphere.
Well, I'm a developer and I've never heard of Swift till now. And I'm sure there are thousands like me. And I'm sure this is a direct consequence of this language being restricted to the small happy Apple world. Apple has (had) a multitude of applications/technologies/application which could gain world popularity instead of only Apple-world popularity, so it's not something new. If Apple is okay with that, then we all should be okay with that, too.
You are connected to Internet. What's the point on duplicating information?
If you don't understand a term, you can search its explanation yourself.
Many click-bait, shit posts come from snydeq and they all link to how-is-it-still-in-business-rag InfoWorld.
I know Slashdot hasn't tried in years, but damn, there are interesting stories out there that can produce good discussion.
Whoever wrote that article doesn't understand Swift well, or Apple for that matter:
Swift is designed to support a world built bottom up in Objective-C. It's meant to play well with the bazillion lines of existing Objective-C, not supplant it.
This is totally wrong. Apple could not be more clear that Swift is built to supplant Objective-C. It will take a while to re-write the frameworks but they are encouraging everyone now to write new stuff in Swift, and as rapidly as possible making the bridge over to the Objective-C frameworks as Swift friendly as possible.
I think Apple will not open Swift at the moment because they want to have a small core group directing where the language goes, at least at first... and then it will open up more from there. But that also supports the notion that swift is not an auxiliary language, but the primary path going forward.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Applle didn't adopt Objective-C. Objective-C came with the package when Steve Jobs returned to Apple and brought NeXTSTEP/OpenStep with him from NeXT. Objective-C is an attempt to graft SmallTalk style object oriented programming onto standard C without breaking too many other things.
What I respect about Apples Swift (not to be mistaken for the other PL Swift) is that it/Apple doesn't claim Swift to be anything other than it actually is. An improvement on PLs already exisiting in Apples Ecosystem tailored *specifically* for developing in that ecosystem, catering to the preferences and addressing the pet peeves of their developer community. AFAICT with no downsides and measurable upsides if you intend to develop native iOS Apps exclusively.
*This* all IMHO is a new lock-in PL done right - as far as you can do those right. .Net/C# mess.
contrary to all the lies, damn lies and hideous marketing bullshit that went into the
Apple did it right again in the way that they actually let the engineers take care of the language, the designers layout a nice free iBook on it and basically kept marketing out of it. ... Not that Apples marketing is really that bad.
If I ever do native iOS development and embrace the golden cage, I might even look into it - the syntax does look less scary than that of the classic C family.
My 2 cents.
We suffer more in our imagination than in reality. - Seneca
It took a vengeful God to confound the languages of man the first time around. This time around we have gone into do it ourselves mode as everyone who wants to either segment markets, is too lazy to improve an existing language, or just wants a monument to their ego creates a new language.
Swift is little more than a potential attractive nuisance and it's hardly in Apple's (The great creator of attractive nuisances) to open source it. They want it to become as popular as possible without becoming universal. That way they will have the largest possible code base and developer base trapped in their system without easy ways to exit.
It was probably 5-10 years from the NeXT acquisition until Objective-C became mainstream in the Mac development community. It was all C++ and Carbon until then.
The point being that Apple didn't adopt Objective-C just to be weird. Next used Objective-C to build NextStep and there's certain things in Objective-C that made NextStep moderately cool.
I actually worked at Apple, on the operating systems team, around that time. Apple was in no position to be arrogant in 1997 and wasn't actively looking for ways to be incompatible. Today, that's a very different story.
Some parts of the NextStep UI layer was built in Objective-C. Most of the actual operating system was written in C, and still is.
It's an argument for why Apple should do it, not that Apple must do it.
In another context, it's a family of Forth-based software by FORTH, Inc. Just to make things less complicated. :-)
Ezekiel 23:20
Faster innovation, better security, new markets — the case for opening Swift (an innovative new programming language for Cocoa and Cocoa Touch [high-level APIs that make it easy to create OS X (a series of Unix-based graphical interface operating systems developed and marketed by Apple Inc.) apps (applications; computer programs that run on PC [personal computer] or mobile device) with just a few lines of code (collection of computer instructions written using some human-readable computer language, usually as text)]) might be more compelling than Apple (American multinational corporation headquartered in Cupertino, California, that designs, develops, and sells consumer electronics, computer software, online services, and personal computers) will admit, writes Peter Wayner (contributing editor of the InfoWorld Test Center and the author of more than 16 books on diverse topics including open source software, autonomous cars, privacy-enhanced computation, digital transactions, and steganography). "In recent years, creators of programming languages (a formal constructed language designed to communicate instructions to a machine, particularly a computer) have gone out of their way to get their code running on as many different computers as possible. This has meant open-sourcing (applying an open-source [a development model promotes a universal access via a free license to a product's design or blueprint, and universal redistribution of that design or blueprint, including subsequent improvements to it by anyone] license [authorization to use intellectual property] to) their tools and doing everything they could to evangelize their work. Apple has never followed the same path as everyone else. The best course may be to open up Swift to everyone, but that doesn't mean Apple will. Nor should we assume that giving us something for free (as in beer) is in Apple's or (gasp) our best interests. The question ( linguistic expression used to make a request for information, or the request made using such an expression) of open-sourcing a language like Swift is trickier than it looks."
I could say the same thing to you, Mr Coward. There's the trap you see - complain about the tidal wave of no-added-value pundits, and someone hits back accusing you of hypocrisy, for making the comment. I've tried ignoring them, I'm afraid they don't seem to be going away.
Half of it doesn't make sense and the rest is factually inaccurate. For instance, Apple won't open-source Swift because people don't want to buy cheap iPad clones? Huh? The foundation of Swift began in the open-source world? Nope.
Any article like this that doesn't mention Apple are the primary driving force behind the open-source LLVM/Clang tools is missing a big part of the puzzle. Apple have a track record of working on this sort of stuff openly once it gets to production quality.
Bogtha Bogtha Bogtha
To be clear: Apple aren't just a contributor, they created Clang and employ one of the LLVM project's founders to work on LLVM, Clang, and Swift.
Bogtha Bogtha Bogtha
"We have no plans to do anything like that. Swift is a new option for developing on the platform. We have no plans to drop C, C++ or Objective-C. If youÃ(TM)re happy with them, please feel free to keep using them."
https://lists.apple.com/archiv...
"Swift is Apple's modern, type-safe language for Cocoa development But Objective-C remains a first-class citizen too"
http://devstreaming.apple.com/...
Seems like it's not meant to supplant but to live alongside it.
Comment removed based on user account deletion
Not only that, but why as a developer would you want to limit yourself to a single OS, never-mind that this one has an evil overlord with its own interests at heart? And FWIW, how come no one in their right mind uses Active X web extensions either?
-"A man has got to know his limitations." -Clint Eastwood's Dirty Harry, mocking the guy who said it to him first.
You can't be ahead of the curve, if you're stuck in a loop.
Yeah, but as I recall wasn't the whole reason for clang that they wanted to stop using GCC, as it's truly free software? Perhaps my recollection is incorrect.
It's the Slashdot Reality Distortion Field in effect, I think.
One thing Swift will address... There are currently 3 memory management models in use in Objective-C, and for some of those models, you don't get a retain count automatically (for example, this is the case for a number of collection objects when doing an insertion).
Swift has the opportunity to rationalize this, which is not something you could do with the Objective-C libraries themselves, since doing so would change historical APIs and thus break old code.
It wasn't really until Metrowerks basically became incompatible with the Intel switchover and the 64 bit support had to drop certain types of support from Finder due to 64 bit inode numbers, and while I happily would have made them new header files so that they would have continued to work with the UNIX Conformance work, where Ed Moy and I basically broke their local private copies of their header files, since Motorola sold off the Intel version of the Metrowerks C the week because Apple announced Intel, it was pretty much DOA at that point.
So it basically took an Act Of God to get some people to get the hell off some of the old APIs we had been dooming and glooming about for half a decade.
Swift is another opportunity for that type of intentional non-exposure obsolescence to clean up the crappy parts of the APIs and language bindings that haven't been cleaned up previously due to people hanging onto them with their cold, dead hands. Hopefully, they will advantage themselves of this opportunity.
Yeah, but as I recall wasn't the whole reason for clang that they wanted to stop using GCC, as it's truly free software? Perhaps my recollection is incorrect.
Or perhaps you are viewing things through political filters.
Apple, and others, stopped using the "truly free" gcc because GPL v3 became quite restrictive.
The FSF overreached with GPL v3, they tried to be too forceful, they overestimated their importance and irreplaceability. The market responded by moving towards LLVM, a less restrictive option.
Don't forget Webkit and Darwin. Does anybody actually use Darwin?
Not really. GCC is inconvenient in several ways. See this comparison for details. Most of them are technical, but a couple are related to the license being GPL. Clang and LLVM are "truly free software" as well, so Apple clearly aren't averse to "truly free software".
Bogtha Bogtha Bogtha
No one is demanding anything, but some of us believe that distributing your software as free and open source software is better for everyone including the original developer. There's nothing wrong in suggesting it.
You can add some reasons why you think that open sourcing Swift would be good for Apple. When you do that, it would be good to look at it from Apple's point of view. Try to find arguments that would convince Tim Cook.
Yes, I am an Apple fanboy and use their stuff. But, I find that Apple is just as guilty as Microsoft in "embrace, extend, and close" They essentially did this with Darwin. Sure their are parts of Darwin that are open source but a lot of the add on stuff is closed up. I would think it would be advantageous for Apple to open Swift up.
I've heard Apple uses it....
Well.. maybe. Or Maybe not. But Definitely not sort of.
Because someone else will do cool things with it that you wouldn't.
Even if Apple decides to keep Swift proprietary, Rust is a language under development by Mozilla (with some help from Samsung) that ~is open source, that has somewhat similar goals, and is listed by Chris Lattner as one of the main influences on Swift. It has a type system similar to Haskell, but is a (primarily) imperative language with full control over memory layout and management. My understanding is that their compiler outputs LLVM IR code, but is self-hosting above that level.
My main issue is we are entering a post desktop world. (No the desktop isn't dyeing, but it isn't the center of our computing world)
So we need the following.
1. A platform to create moble apps.
2. Being able to create these apps on different systems.
It is actually very lame to have to have a Mac to build an iOS app. You really should be able to do it on at least the Big three OS Windows,Mac,Linux. Because we are not desktop centrist anymore and people will go around with different Desktops and OS's freely.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
No they wanted to stop using GCC because it's GPL v3. Apple generally prefers BSD type licenses and GPL v2 licenses. Add to that the GNU Project wasn't devoting much time or resources to Objective-C.
Well, there's spam egg sausage and spam, that's not got much spam in it.
Swift is a programming language. Anyone can write a different compiler for it. Open sourcing Apple's LLVM frontend would be nice, but is not required.
If it's not open sourced and no one does a Swift implementation, we'll be exactly in the same situation as before. You had to write Java for Android and Objective C for iOS. Now you'll have to write Java for Android and Swift for iOS. I fail to see how that changes anything, except Swift being slightly less annoying thatn ObjC.
90% of the article serves to show that the author doesn't understand the difference between a programming language and the libraries provided by OS X. The other 10%... well I didn't notice what it was about.
And this crap makes Slashdot...
I apologize for the lack of a signature.
Apple prides itself as a closed ecosystem.
Apple prides itself on an integrated system. That does not always mean closed. For example, their music is AAC which is the successor to MP3. This is not a format of their design.
Yes it may have adopted some open source projects like WebKit in Safari.
And by adopted do you mean made it the de facto engine for many different web browsers? When Apple forked KHTML, it was not used by Google or Opera etc. If you want to ignore that they created OpenCL, LLVM, Bonjour, etc.
Well, there's spam egg sausage and spam, that's not got much spam in it.
You could have binged it in the time it took to ask that question..
Steve Jobs said that FaceTime was going to be open source when he introduced it.
But it never happened.
Get free satoshi (Bitcoin) and Dogecoins
Yeah, no body use WebKit, wait what.
They stopped using gcc for various reasons, the project was stagnant, ridden by core developers that could not agree on a road map, it forked a few times I believe and it was always not only buggy but years behind modern C++ standards. Not to mention gcc is slow and the code it produces was not really fast or small in the recent years.
No idea how it is faring right now.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Languages don't get open sourced - language implementations do. So a real informative article would talk about why apple would or wouldn't propose Swift to a standards body as a new language.
My understanding (from Apple employee comments, including by Chris Lattner who created Swift) is that the language is evolving in the open now. Version 1.0 is going to be supported by iOS 8 tools, but that doesn't mean there may be several updates even over the next year to fundamental language concepts. Languages evolve from use; the best way to make Swift better is to have people both inside and outside of Apple start using it and providing feedback.
They actually designed the swift implementation to make more rapid evolution of the language possible; there are no components at the OS level or shared by applications. Instead, you bundle your application and dependent libraries with the swift runtime corresponding to the compiler version used to compile every swift thing in that bundle. In exchange for more space used by duplicating libraries, they can actually let you ship and support older swift code that might not even compile with the newest tools due to language changes.
In that environment of rapid innovation, attempting to standardize the language or to promote alternate implementations would be insane. However, these are both things which I've seen hints are desired once the language calms down. If Swift is proposed as a new language to a standards body, it is incredibly likely that Apple would also give components of their Swift implementation to the LLVM project.
That's not a flaw with open-source, that's one of the beauties of it. Whoever has a vested interest in it, can benefit from it. If I can get something out of it, why should I care if someone else can profit from it more than I do?
They stopped using gcc for various reasons, the project was stagnant, ridden by core developers that could not agree on a road map, it forked a few times I believe and it was always not only buggy but years behind modern C++ standards. Not to mention gcc is slow and the code it produces was not really fast or small in the recent years.
No idea how it is faring right now.
You should really take a look at gcc 4.9 because your viewpoint is seriously out of date.
Don't blame me, I voted for Baltar.
Type-casting -oh my lord type casting- is so astoundingly bad in Swift
What don't you like about it?
I like it because it precludes a lot of stuff from going wrong unless you are very explicit in telling swift how you would like to be shot in the foot.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
So, you can build a proper static analyzer with GCC libraries now?
It can be argued that gcc 4.9 is there because of clang. He said he doesn't know how it is faring right now.
Almost everything you said is wrong. At the time clang was born GCC was not stagnant, it was moving along quite well, and it was busting out C++ improvements.
For Objective-C it was. So Apple either had to switch to C++ or go on their own which is what they did. Now Clangs work on other languages but Apple's focus was always on Objective-C.
Well, there's spam egg sausage and spam, that's not got much spam in it.
Webkit was a fork of KDE's HTML renderer, mostly over maintenance issues.
So when Apple rewrote the engine in WebKit2, it was over "maintenance issues"? That's a little bit of revisionist history. When Apple forked KHTML it was for one reason: control. Apple wanted to make a lot of changes (which they did) and take it in a new direction. They could have stayed with KHTML; however, that meant they would have to rely on KHTML developers to approve and upstream changes. So they forked it which they are allowed to do.
I don't think Apple has ever open sourced anything because they actually believed in open source ideals, namely that open sourcing something has a positive-sum outcome.
No Apple is interested in getting things to work. If that means open source, that's what they'll do. The positive-sum is not for them but for us.
Well, there's spam egg sausage and spam, that's not got much spam in it.
No, they're saying Apple switched because GCC's core wasn't designed in a way that made it easy to extend the Objective-C bits in the way that Apple wanted. And that could well be part of it—I'm not sure.
But I think a bigger reason was that Apple could use Clang to make Xcode better, whereas GCC's parsing libraries were A. pretty tightly coupled to GCC (making it technically difficult to reuse them) and B. licensed under a license that made linking them into non-open-source software problematic at best.
Check out my sci-fi/humor trilogy at PatriotsBooks.
Er what? The Gnu Project has always been the maintainer of gcc. Apple is the maintainer of their version of Objective-C. gcc compiles C++, Objective-C, Fortran, Ada, Java, etc. However, just because someone enhances a language that can be compiled in gcc does not mean the gcc compiler takes advantage of any changes. This is because Apple is not the Gnu project. In the same way, Oracle (or Sun at the time) making changes to Java does not mean the gcc compiler would work well with the changes or optimize the compiler. Objective-C development on gcc was pretty stagnant whereas C++ development was busy. So Apple had 2 real choices: 1) build their own compiler or 2) re-write everything in C++
Well, there's spam egg sausage and spam, that's not got much spam in it.
Very true. Case in point: in didn't even know about this 'language' (dialect).
I don't see anything about demand there.
The frontend is not the entirety of gcc. For example, if Oracle puts out a lot of enhancements to Java, they still have to get the Gnu project to modify gcc components like the parsers and back-end. Now Oracle or Apple could merely accept that performance for compilation and execution under gcc would be slower without optimization. That's where the stagnation was coming. Sure gcc could compile Objective-C but it was never optimized. It was never going to be optimized. So Apple created their own compiler. Oracle also maintains their own Java compiler.
Well, there's spam egg sausage and spam, that's not got much spam in it.
Why should I? I talked about stuff long ago, I'm not interested in gcc :)
I use LLVM/clang on my Mac and professional C++'compilers for embedded (but honestly, because the customers demand it)
That was not my 'viewpoint' but a reiteration of stuff I observed the recent years.
However it is nice if modern gcc is back on track for standard compliance and state of the art code generation.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Apple haven't said that they will open-source Swift. The only thing they've said so far is that they've been concentrating on getting it to 1.0 first and haven't made a decision about open-sourcing it yet.
Bogtha Bogtha Bogtha
So lets summarize the authors babbling: Apple has no actual incentive to OSS Swift other than appeasing people like the author who think Apple should do what they want even though they don't care for Apple.
Basically, he's a freeloader and thinks Apple should support him.
He seems to think his opinion of whats good for Apple matters, and that Apple doesn't know what they are doing. Ironically, Apple is sitting on ridiculous amounts of cash, and the author is a writer for Infoworld.
Now, I'm not even bothering to address the technical reasons the author is a moron, just the plain old common sense things. This guy's just grumpy he can't install some sort of Swift capable IDE/Environment on his windows machine for free, thats the only reason the article exists.
From a technical perspective he doesn't seem to understand that Swift, as done by Apple, without Cocoa ... is fucking pointless. The whole point of swift is a language that works perfectly for a nextstep/cocoa style universe. Trying to shoehorn the rest of the computing world into swift is just pointless.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
I use both, actually I use a couple of others as well. I often find interesting edge cases and bugs just by running my code through as many compilers as possible.
Yeah, that is a good practice.
My next project will be embedded C++, likely/unfortunately I wont program, but I will set up tests and one thing is to compile with various compilers as well.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
I completely disagree Swift VERY special. I'm a embedded systems programmer, and I most to use Swift. There is no other serious contender right now for a modern systems language than can replace C, C++ or objC.
Swift ia very unique language is that it:
1) Has the high level language syntactical goodness of a scripting language like Python or Ruby
2) Has the native performance of a systems language like C
3) Has strong support for multiple paradigms including Functional Programming, Object, and procedural
4) Can morph from a JIT language during compile time for faster programmer efficiency (Like Java), and compile fully native like C
5) Has a hot-coding environment like I've never seen anywhere else
There is only one language that come close to this, and that is Rust. But Rust is probably 5 years from being production ready. And it lacks the JIT-y hot coding goodness.