580 points · by maxdesiatov · 7y ago · 208 comments
-----
Disclaimer: I'm not an apple employee and not am not lawyer, this is just my understanding of the situation having spent lots of time talking to lawyers and other experts about this:
I agree with much of the sentiment that software patents are often silly and the system is broken in many ways. This patent is a reasonable example of that (patenting syntactic sugar for monads, really?). I have no idea if there is prior art, but I wouldn't be surprised. For sake of discussion, lets assume the patent is valid.
Even if I and others don't like it, the software patent system exists. As is pointed out upthread, one of the major reasons that Swift uses the Apache 2 license is to provide more certainty for the community w.r.t. licensing and patents. An additional bonus of the Apache 2 license is that the open source project as a whole benefits from companies having and contributing their patents under the terms of the license: to say more directly, it is good for the Swift project that Apple has this patent and has contributed it to the project.
The reason for this is the Apache patent revocation clause 1, the end of bullet 3:
>If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
This basically says that if someone sues someone else over Swift then they lose access to the patents contributed to the project, and are therefore subject to countersuits. This is a significant part of the protection that the Apache license provides (it is a big deterent to lawsuits in general) but it only has teeth if there are actually patents in play!
The LLVM.org community is actively working on a multi-year relicensing effort specifically to achieve these sorts of projects for LLVM as well.
-Chris
-----
Am I misreading this to mean that if Apple sues someone for infringement over the patents they have been granted, they immediately lose those patents?
The reason it doesn't matter is because of this:
"then any patent licenses granted to You under this License for that Work"
As the owner of the patents, Apple doesn't need this license to have rights to those patents. They have rights otherwise.
Now, it would terminate the rights they have to other people's patents under the license. (IE if a contributor submitted something the contributor owned a patent to, apple would lose rights to that patent)
For example, with Swift, IBM is a major code contributor and runs significant portions of the project. IBM is one of the largest patent holders in the world. If Apple and IBM ever had a patent dispute involving swift, wouldn't that naturally lead to attorneys scrutinizing every other similarly licensed open source project to find an angle against each other or their partners? Wouldn't that then lead to other companies getting drawn into the dispute? And once the gates are opened, any long-simmering patent issues would be easy to add... affecting more projects and companies...
What would have happened if the Microsoft/Google/Android dispute involved Apache 2?
IANAL, but these boilerplate patent-agreements-in-open-source-licenses seem scarier than just leaving things ambiguous.
A) give some chunk of your profit to someone else while you
B) reallocate development resources to invent something new that lets you keep doing business without relying on the patent
In the end, B) is valuable and A) costs money and they probably cancel out, financially.
Also, has anybody noticed that every single language in existence borrows features from some other language FOR FREE? If all languages started patenting their features then we soon will be completely boggled with lawsuits or unable to invent new, better languages as they will not be able to use already established convenient features.
There are only this many simple convenient ways to denote programming language features. There is limited number of single character operators and ways you can organize them. Granting patents to single characters is just stupid.
This is wrong. The license says:
>3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted.
'Each Contributor heareby grants to you, ... licence ... to use ... the Work ....'
However, I am very much not a lawyer. Like Chris, I do talk to IP lawyers as part of my work.
> Am I misreading this to mean that if Apple sues someone for infringement over the patents they have been granted, they immediately lose those patents?
You in this case is likely a defined term with a narrow meaning and likely does not refer to Apple (which is probably referred to as We, Us, "the company", etc) in the document.
Since Apple has received the patents, not through the Apache 2.0 license, but from the USPTO, they would not lose access to those patents should they sue for infringement over them. IAMAL, but it seems like there still might be a case to be made for Apple's use of Swift to be covered through the Apache 2.0 license.
It seems like the most logical explanation of this whole thing is that Apple wants to ensure that all users of Swift are free from litigation. To do so, they used the Apache 2.0 license to cover the code. However, the license requires there to be patents that exist, so that enforcement clauses prevent trolls from being granted a patent and then going after users of Swift. So, Apple filed for some patents that cover aspects of Swift.
Looks like an implementation of a compiler not from Apple (that is, not a fork, or one that diverged too much from the original) or different languages that overlap with the patent would be infringing even if they used Apache 2.0 as well.
Monad Maybe where
Nothing >>= _ = Nothing
(Just x) >>= f = f x
Those three lines, implementing the Maybe Monad/bind operation, are commonplace in all functional languages. (They just called it Optional instead of Maybe and "chaining" instead of "bind"/>>=)( https://docs.swift.org/swift-book/LanguageGuide/OptionalChai... )
EDIT:
The second one linked is a package manager — https://patents.google.com/patent/US9329841B2/en?oq=9%2c329%...
The third one is "a programing language that combines elements from C and Objective-C", sounds like a broad claim on swift — https://patents.google.com/patent/US9329844B2/
1. A non-transitory computer-readable medium with instructions stored therein, the instructions, when executed by a processor, cause the processor to perform operations comprising:
receiving a first request to compile a first set of program instructions coded in a first high-level language, the first high-level language a C language based object-oriented programming language;
receiving a second request to compile a second set of program instructions related to the first set of program instructions, the second set of program instructions coded in a second high-level language including object-oriented elements and procedural elements, wherein the second set of program instructions includes a data type provided by the second high-level language to indicate absence of a value of any type;
compiling the first set of program instructions and the second set of program instructions using a modular compilation system including multiple front-end compilers, the first set of program instructions compiled into a first intermediate representation of the first set of program instructions and the second set of program instructions compiled into a second intermediate representation of the second set of program instructions;
linking the first and second intermediate representations; and
compiling the first and second intermediate representations using a back-end compiler that is specific to a target processor.
Edit wrt edit in parent: all three of these claims apply to Rust.
That said, I think there are other languages with very similar syntactic sugar (e.g. Rust), so this is still a very questionable claim.
In that case, whether the patent is valid or not doesn’t matter.
> Apache license gives the right to use patents required to use the code (assuming the original author had those rights), and the code implementing optional chaining in the compiler is Apache licensed. So, the only thing Apple having a patent on optional chaining does is to stop frivolous suits from patent trolls. It can't be used for any kind of nefarious power play by Apple, which is what OP was worried about.
By patenting this language feature Apple has very clearly stated that they are "making a claim of ownership" as it were of this feature across all languages and non-derivative implementations.
...which is a perfect example of why software patents shouldn't exist in the first place. One could implement this feature in any number of novel, unique ways therefore the patent is nothing more than a claim on a broad concept rather than a specific implementation (which is what patents are supposed to cover).
The paradox of patents on software is this: If the patent covers what it's supposed to cover (a specific implementation) the patent will be useless because anyone could implement what amounts to the same thing using different methods, languages, whatever. If the patent covers a broad concept it will prevent anyone from using it or innovating in that entire domain until the patent expires. Completely defeating the purpose of having patents in the first place. It will also likely (after millions upon millions of dollars wasted in lawsuits) be ruled invalid as being overly broad.
Software patents are inherently a bad idea and should be done away with.
They're about innovating technological abilities, and disclosing them in exchange for limited monopoly; it's not about specific products or specific implementations.
If it were just about implementations then all patents could be easily circumvented and there would be no reward in exchange for the full disclosure of a new invention.
(Design patents do cover specific implementations at the morphological level.)
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.
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.
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.
https://therealdanvega.com/blog/2013/08/20/groovys-null-safe...
That is, in Rust you'd use Option::map or Option::and_then, there is no equivalent to the `?.` and `?[]` operators, the `?` operator (or `try!` macro) is a shortcut for an "unwrapping guard".
Patents protect how you something, not what you do.
So if you fork Swift, you’re covered. If you don’t form Swift, then you’re not covered.
Note that the Apache license is much stronger / better than the PATENTS.txt files accompanying projects like those from Microsoft / Facebook, because those usually don’t cover forks and are designed to protect the parent company.
Nope. Prior art is the only protection against patent trolls. Patents are no protection at all against trolls because patent trolls are unlikely to infringe any of your patents, due to their sole business being patent litigation.
There are two reasons for Apple to get these patents: defensive and offensive patent litigation against other companies in the industry. Apple has a history of using offensive patent litigation, going so far as using it as a weapon to keep industry wages low. https://www.cnet.com/news/steve-jobs-threatened-palm-with-pa...
Its just a mutually assured destruction arms race. The system is broken.
Anyone would be free to use the patent. But trolls can't sue with it.
Then you whip out your defensive patents and demand that IBM licenses your IP for 3% of their revenue. (Win-win cross licensing ensues...)
Patent trolls are a different animal though. However, having some good patents may at least protect you from willful infringement (increased damages)
The patent (9,952,841) seems to be about the language swift.
There is mention about language features describing the language, but I don't see a specific claim to any of them.
"optionals chaining" (the feature that everyone is alarmed about) is just one of the features listed. Other features mentioned include an "IDE" and "unicode" as well as support for "functions".
Am I missing something? Where is the claim on an specific language characteristic?
So stare at https://patents.google.com/patent/US9952841B2/en
and look only at the claims.
To me, that set of claims is ... worrying
As someone who's been working on the platform for several years before Swift was announced and got to watch it all unfold, it's pretty incredible to see it described so succinctly. And definitely worrying as to the future direction of the work I've done.
Could you help us know any similar software development ecosystems that have been similarly patented, or anything else that might indicate how it could play out?
It's not because there is magic here, it's because the set of rules, regulations, and interpretations to follow is voluminous.
The document you want is called the MPEP. https://www.uspto.gov/web/offices/pac/mpep/index.html
This covers the rules/regulations/interpretations/etc that they will expect you to know/follow, and examiners to know/follow. In that sense, it literally does cover everything you'd need to know to do this right, and how the examiner/etc will look at your patent application, etc. It's even understandable by normal human beings and goes to great lengths to explain its reasoning and the case law that supports their views.
However, it's also thousands of pages.
Now, it's definitely possible and in my experience, examiners are fairly nice to pro-se applicants and try to be helpful.
But this would really be a thing you'd want to have to spend a significant amount of time doing. For the vast majority of people, it's much more effective to hire someone who will charge a fixed fee.
(for a single person filing a patent for the firs time, you'd qualify as a micro-entity, so most of your fees would be the lawyer/agent for sure)
But, if you decide to do it, that's the document you want.
(And just as a disclaimer: i don't make a living patenting stuff and think patents in general hurt a lot more than they help. So i'm really not the type to tell you to go spend money on a patent lawyer if i can avoid it)
edit: word order
This actually seems quite legitimate from a 'patentability' standpoint. The precise mix of features coupled with syntax would definitely be patentable under existing law.
This does make it risky to implement a competing compiler however.
Unless, of course, you can satisfy the terms of the license and include the copyright/license and a list of changes (which is indeed a little strange if it's actually a fresh implementation). That said, if you're needing to provide the same license, then you might as well fork it and not worry about starting from scratch.
If the patents are to defend the language then they should have no issue donating them to a dedidicated org which gives transparent and iron clad guarantee that they can never be used aggressively. If not, I expect them to pop in the next Apple vs. X thermonuclear ligigation where any and every bit of IP gets used as a weapon.
If we can't fix software patents in the courts then it might come down to us the devs to reject any language or API that doesn't sign up to into the appropriate non-agression pact. We need something similar for API copyright too. We are on a bad path right now where the big orgs have every incentive to be less open and more litigious.
Edit: actually, see below.
(It protects how Apple implemented some features)
Apple is a Contributor. They have given a patent grant on their contributions. If they didn't contribute something to Swift and they sue Swift other contributors for making a patent violation or their non-contributions, then all patent grants for Apple disappear and other contributors can sue Apple for anything that Swift uses that was patented.
IANAL.
I don't see how options chaining is specifically reserved, it's a patent on the entirety of Swift by the looks of it.
Please keep it in mind next time you purchase a laptop, smartphone or tablet!
So they are patenting something for our protection?
It does open the door for gcc to inadvertently develop similar functionality and get sued. Not that there's, afaik, a cleanroom implementation of Swift.
I make a language with "Apple's" claimed invention. (EDITED)
Apple sues me.
The patent is about building a compiler out of 2 modular front-ends – each taking an input language (one being an OO language based on C), generating the appropriate IR, and handing the IR to a backend.
It goes on to specify that one of the integrated frontends does more compile-time safety checking, calling out bounds-checking and optionals, and the other doesn't (because it is specifically based on C).
yes, it chains:
(cadar nil) -> nil ;; the nil object doesn't have a "car"
(cadar '((b c))) -> c
;; i.e.
(car (cdr (car '((b c))))) -> c
This is exactly like, in Swift-like syntax, doing '((b c)).car?.cdr?.car? where the ? indicates "don't blow up if it's nil", except the "don't blow up" is built into car and cdr.This freedom was introduced in InterLisp, quite a few years before Jobs and Wozniak got together in a garage to make the Apple I.
If you want prior art, there it is.
Another prior art, related to this, is the Null Object Design Pattern, which is very similar.
In Common Lisp, this pattern (like many others) disappears because `nil` is the element of a `null` class, to which we can specialize methods. So in other words, we can make
If we have a method called position that normally returns the position of an object, if we specialize the method to the null class we can make (position nil) do something.
In Java-like OOP languages we would have a specific NullWhatever class that implements the same Whatever abstract interface/base as an ActualWhatever. Thus we then have an optional Whatever because code that takes a Whatever can take a NullWhatever or an ActualWhatever.
Yet another prior art is the use of sentinel objects instead of null pointers: for instance doubly-linked lists that have a special node, not considered part of the list, that is the predecessor of the first, and successor of the last. Then the code operating on lists neither blows up with a null access, nor does it have to check for nulls. Statements like node->prev->next = node always work.
"The single event that had the most influence on the creation of the League [for Programming Freedom] was Apple's lawsuits against Microsoft about supposed copyrights violations of the look and feel of the Macintosh in the development of Windows."
https://en.wikipedia.org/wiki/League_for_Programming_Freedom
The patent protects how a compiler implements some features in a multi-target environment. Nothing to do with optional chaining.
Who "learned that"? The public (devs, etc) already knew and wanted that.
Companies however, have been patenting their languages and techniques since OS/360 or earlier (IBM, Oracle, MS, Google, and so on). So it's not as if "Apple has gone insane" at all, all big players do it. And not because they want to sue either -- you also need them to not be sued yourself oftentimes... (if Apple doesn't patent e.g. their "Optionals chaining" technique mentioning, what's to stop e.g. Oracle doing it and suing them?)
Can you imagine every Swift app has to be deleted because of a competing patent claim?
Anyone remember LZW? https://en.wikipedia.org/wiki/Lempel–Ziv–Welch#Patents
Proof that they had it before it was patented.
I don't know of any instances of Amazon, Google or Facebook trying to patent programming languages. Microsoft definitely did try this.
Questions in that thread:
> 1. If a separate open-source programming language under Apache 2.0 license implements an optional chaining feature, would it be a violation of the patent then?
> 2. What if there's a separate implementation of a Swift compiler developed from scratch independently from Apple, does mean that it's not able to implement optional chaining without licensing the patent?
> 3. Here's the most interesting part: let's say there's a fork of a Swift compiler that significantly diverged and is developed independently from Apple. It seems to me that forks like these still don't violate the patent, otherwise any GitHub fork with unmerged PRs would be a violation. But let's say Google's fork no longer wishes to contribute its changes upstream, at what point does this separate development could trigger a patent violation? Does amount of divergence have any impact, let's say 90% of the codebase changes? Does the name of project matter, if someone names their fork as "Sparrow", not "Swift" is it considered a patent violation at this point if there's no license and royalties paid for optional chaining?
They have patented one or more ways to implement some programming language features.
Read the claims, that is what is protected. Do one step differently and you are golden.
This patent is a nothing burger.
Don't take it personally. Patent law is about the most complex area of law. Most tech press blows it too.
https://www.forbes.com/sites/stephenmcbride1/2019/01/21/the-...
Maybe the rescue plan is to become a patent troll?