So if you implement the claims of the patent in something that isn't derived from the Swift code you are not covered under The Apache license.
It is a purposeful limitation of the Apache 2.0 license that the "patent pool" effect is limited to the project.
If someone makes a from-scratch implementation of Swift, or any other language with similar features, can Apple then sue them over these patents? Or does AL prevent this?
> If someone makes a from-scratch implementation of Swift, or any other language with similar features, can Apple then sue them over these patents?
Yes, Apple can sue you for making use of their patents w/o a formal license in place!
> Or does AL prevent this?
No! The Apache License protects users who use code from the project in question, but does not allow you to use those patents for other purposes.
To give a parallel example:
I license a photograph of two kids in overalls to put it on a poster and sell it.
That does not give me permission to use that image on playing cards, porcelain dolls, or other avenues.
https://www.farmanddairy.com/columns/the-story-behind-the-fa...
Any number of people could try to sue you for any number of things. Thats unfortunately how lawsuits work.
You could also attempt to get another license from Apple for your work. They might not be willing to do this unless you somehow could guarantee all patent licensees for your version of Swift would be unmotivated (by some legal clause or agreement) to sue them as well.
I doubt Apple would go through the work of getting a patent for something that they already openly give out licenses for people to use (via Apache 2) unless it was meant purely for defensive purposes. So I'd be shocked if they went after a from-scratch Swift implementation except for trademark purposes (aka, you can't call name it Swift if it is a partial implementation)
This is not, by itself, a bad thing. In fact, it's good.
However, is there any way Apple could change their minds in the future and start wielding the patent against others? To me, that is the danger of granting patents even to people who appear to be acting as a good guy.
No. The Apache License 2.0 does not work that way. You are allowed to copy and use everything in the Swift language to your own liking in a similar manner to the MIT and BSD permissive licenses. However if you then try and begin a lawsuit against Apple for anything in what you copied, your rights are terminated, therefore invalidating your suit. The Apache License also gives you access to the patents in the language. It's a bit of a hack like GPL is, except that you are allowed to do just about anything with the code except sue.
The license, at least the way I see it, is a signal that Apple isn't in the business of patenting language features. In fact, in a way, Apple is using their resources to gobble up space that patent trolls can never again exploit. Once a patented feature is released under Apache 2.0, I know of no way that it can be undone.