Slashdot Mirror


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

18 of 183 comments (clear)

  1. I disagree by bazmail · · Score: 5, Insightful

    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.

    1. Re: I disagree by bazmail · · Score: 4, Informative

      Wrong. Open source does not mean chaos or loss of control.For example Mozilla Firefox is open source but Mozilla are still firmly in control of the project.

      Its a question of good governance. Give it freedom but yet maintain direction. Not an easy balance to get right as companies like Oracle are slowly learning. How much control would Apple want to exert? My guess is a lot.

    2. Re: I disagree by bazmail · · Score: 4, Insightful

      No Mozilla is only in control of the implementation branded as Mozilla,

      Yes. that would be "Mozilla Firefox", the project I explicitly referred to.

      ... ironically through copyright/trademark laws.

      Ironically? How so?

      ... anyone is free to fork the product and potentially completely remove any control Mozilla has by simply doing a better job at building the browser

      Yes. Which would then be a different project

  2. What for? by joh · · Score: 3, Interesting

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

    1. Re:What for? by TheRaven64 · · Score: 5, Interesting

      I maintain the GNUstep / Clang Objective-C stack. Most people who use it now do so in Android applications. A lot of popular apps have a core in Objective-C with the Foundation framework (sometimes they use GNUstep's on Android, more often they'll use one of the proprietary versions that includes code from libFoundation, GNUstep and Cocotron, but they almost all use clang and the GNUstep Objective-C runtime). Amusingly, there are actually more devices deployed with my Objective-C stack than Apple's. The advantage for developers is that their core logic is portable everywhere, but the GUIs can be in Objective-C with UIKit on iOS or Java on Android (or, commonly for games, GLES with a little tiny bit of platform-specific setup code). I suspect that one of the big reasons why the app situation on Windows Phone sucks is that you can't do this with a Windows port.

      It would be great for these people to have an open source Swift that integrated cleanly with open source Objective-C stacks. Let's not forget that that's exactly what Swift is: a higher-level language designed for dealing with Objective-C libraries (not specifically Apple libraries).

      Objective-C is a good language for mid-1990s development. Swift looks like a nice language for early 2000s development. Hopefully someone will come up with a good language for late 2010s development soon...

      --
      I am TheRaven on Soylent News
    2. Re:What for? by K.+S.+Kyosuke · · Score: 3, Interesting

      Hopefully someone will come up with a good language for late 2010s development soon...

      Well, there's always ClozureCL with its Objective-C bridge. :D

      --
      Ezekiel 23:20
  3. Re: Editors ! Explain terms, then add the story by kthreadd · · Score: 3, Informative

    In this context it's a programming language for the Objective-C runtime developed by Apple.

  4. Re: Apple not in my best interests either by kthreadd · · Score: 4, Interesting

    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.

  5. What is Slashdot's Relationship to InfoWorld? by Anonymous Coward · · Score: 3, Insightful

    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.

  6. Article shows fundamental lack of understanding by SuperKendall · · Score: 4, Interesting

    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
    1. Re:Article shows fundamental lack of understanding by disambiguated · · Score: 5, Insightful

      You're both wrong/right. In order to supplant Objective-C, Swift would have to play well with the bazillion lines of Objective-C, and coexist with it for possibly a very long time. On the other hand, even if Apple "could not be more clear" that swift is built to supplant Objective-C, that doesn't mean it will succeed, and doesn't mean Apple won't change their mind. It's a gamble and they certainly know it. They keep that to themselves in order to encourage you to drink the cool-aid.

      See also: Microsoft and .NET

    2. Re:Article shows fundamental lack of understanding by gnasher719 · · Score: 3, Insightful

      Type-casting -oh my lord type casting- is so astoundingly bad in Swift it really beggars belief that in the 21st century anyone could design something that bad!

      Then I'd say you didn't understand it.

  7. Re:Deliberate incompatibility by Kalium70 · · Score: 4, Informative

    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.

  8. What I like ... errrm, respect about Apples Swift by Qbertino · · Score: 4, Insightful

    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.
    contrary to all the lies, damn lies and hideous marketing bullshit that went into the .Net/C# mess.

    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
  9. Re:Your post is a non-sequitur. by putaro · · Score: 3, Interesting

    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.

  10. Re: Apple not in my best interests either by Bogtha · · Score: 5, Informative

    Some has contributed a nontrivial amount of work to LLVM and especially the clang project.

    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
  11. One thing Swift will address... by tlambert · · Score: 3, Informative

    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.

  12. The FSF overreached with GPL v3 ... by perpenso · · Score: 5, Interesting

    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.