To expand on that: MIT and Apache2 grant a licence to copyrightable expression. But the literal code is not what is patented, the idea is. Granting a license to the code doesn't automatically prevent someone else from patenting the idea.
MIT doesn't say anything about patents. Apache2 additionally grants a licence to any patents which the author has which cover the work, and also tries to prevent someone using the work and then suing other people for patent infringement. But it does so by saying
" any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed." Which is a null threat in this case, as the idea is to try to prevent there being a patent in the first place.
You could argue that the author should have patented the idea, and then freely licensed it. But since patents cost thousands each, that's a bit much to ask.
This is the brutal truth of how crappy our current patent mechanisms are. The definition of what constitutes a patentable extension to practice of ideas that are well known or explicitly in the public domain is very weak. So, until something is patented and actively protected by bulldog lawyers, there is a risk of someone else trying to umbrella it in their own patent. Google's move can even be justified on defensive grounds that some other jerks could do the same. But the core problem is an arms race to the bottom of what trivial distinctions can be claimed.
Publicly disclosing the idea in a way that can be verified after the fact establishes prior art just like filing a patent does.
I’m not a lawyer, but I do know there are services that inexpensively publish inventions and vouch for the publication date after the fact.
Also note that the vast majority of patent litigation never makes it to trial, so whether a patent is “valid” or not is a gray area in practice.
Being granted a patent by the USPTO doesn't guarantee that the patent is actually valid. It's technically possible for them to grant identical patents to two separate people by mistake, and then the courts have to determine which one is valid.
That's one reason why companies rich enough to spam the patent office tend to do so. Company A invents X. If they don't patent it, then Company B can invent X+1, a minor improvement on X, and patent X+1 themselves. Now Invention X can't compete with X+1, so Company A invents X+2, an improvement on X+1, but now they have to pay license fees to Company B even though they invented the original thing! Solution: just try to patent every stupid thing.
So we have:
idea > teachable invention > implementation
(where '>' is 'more abstract than')
The GP seemed to by conflating the invention and implementation, in asking what difference the licence of made. That was the distinction I was trying to draw. Duda put the invention in the public domain, not an implementation - it's not clear you can apply the MIT or Apache licenses to an invention at all.
I was at Xerox when they were fighting a patent on their ideas. At that point in time all you had to do was prove prior art on the idea. Xerox used their notes during software development plus the code to prove prior art.
Similarly I was at Apple when they fought a basic patent on color matching. Apple succeeded in fighting the patent then proactively started patenting everything.
Thought it could be challenged as unconstitutional:
> Many legal scholars have commented that such a change would require a constitutional amendment. Article I, Section 8, Clause 8 of the US Constitution gives Congress the power to “promote the Progress of ... useful Arts, by securing for limited Times to ... Inventors the exclusive Right to their respective ... Discoveries.” These scholars argue that this clause specifically prohibits a first-inventor-to-file system because the term "inventor" refers to a person who has created something that has not existed before. (Wikipedia)
But doesn't the fact that the code has already been released mean it's prior art?
That maybe true but without any more detail your comment is still unhelpful.
Thank you for the correction :)
There are also services where you can register your prior art, which say the USPTO uses them when evaluating claims; I don't know how useful they are in practice.