14 ms·
Apple is patenting Swift features
- nonsince 8y agoThis feature wasn’t even invented in Swift, the fact that a patent was granted on it shows the sorry state of technical policy making
- swiley 8y agoI think American patents changed some time in the past decade to match how they’re done in the rest of the world; The first person to patent the thing gets the rights completely regardless of the time or person the implementation is associated with.
- willio58 8y agoOut of curiosity, which language would you say first implemented optionals?
- klrr 8y agoI don't know which specific language, but there been around since at least 80s I would guess.
- davidgrenier 8y agoThis is a specialisation of algebraic datatypes, it has to go at least as far back as SML.
- pnw_hazor 8y agoGood thing this patent does not protect any programming language features. (It protects how Apple implemented some features)
- dmos62 8y agoThese patents seem to be a countermeasure against patent trolls, since the code uses the Apache license. Quoting from link: > 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.
- skohan 8y agoTo echo a comment in the linked thread: what does the Apache license say about other implementations? If I want to create my own implementation of the Swift compiler, or create another language with optional chaining, would this license protect me? Or does it only protect the use of this implementation?
- kbsletten 8y agoWell, given that Rust and C# also have these features I think the likelihood that the patent is upheld is unlikely. I guess they could threaten you with it since lawyers are expensive, but it seems silly to me.
- masklinn 8y agoFWIW Rust does not have optionals chaining, except in the monadic sense (in which case ML and Haskell have optionals chaining). 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".
- lalaithion 8y agoRight, but isn't `?.` just syntactic sugar on `Option::and_then`? Is this a patent on a piece of syntactic sugar, or is it a patent on the idea of chaining optional values?
- carterschonwald 8y agoMonads and do notation as prior art. Boring
- davidgrenier 8y agoThank you, I was wondering if they had patented a half-assed version of monads.
- pnw_hazor 8y agoThey haven't patented monads or any programming feature.
- carterschonwald 8y agooption chaining definitely is that. seen in both swift and rust. and I guess in some styles of javascript too afaik
- moomin 8y agoYep, also C# has the same damn thing specialized to optional chaining for the same exact reason. The Prior Art is Strong in This One.
- kevin_b_er 8y agoI wish you the best of luck at defending against Apple's lawyers backed by a patent system that no longer promotes the progress of science or useful arts.
- carterschonwald 8y agosomething something, i wish apple lawyers going after projects sponsored by microsoft. :)
- coldtea 8y ago>This is very disturbing. It's like Apple has gone insane. Computer languages are not supposed to be owned by any company. We learned this mistake with Java and APIs. Computer languages are supposed to be a part of the Commons, owned by everyone for the benefit of humanity, not the benefit of a greedy corporation. 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?)
- mathnmusic 8y ago> all big players do it I don't know of any instances of Amazon, Google or Facebook trying to patent programming languages. Microsoft definitely did try this.
- solarkraft 8y ago> what's to stop e.g. Oracle doing it and suing them? Proof that they had it before it was patented.
- JKCalhoun 8y ago> 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 https://en.wikipedia.org/wiki/Lempel–Ziv–Welch#Patents
- thekingofh 8y agoYou are correct here, but the question is, is there a flaw in the Apache License then? Should it also include the patent grant for non-derived works, as long as someone adheres to the license?
- duncanawoods 8y agoCan we setup the equivalent of https://www.openinventionnetwork.com/ https://www.openinventionnetwork.com/ for programming language design? 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.
- thekingofh 8y agoApache License 2.0 is as good as donating it. Just now, nobody can sue anyone else for that design feature. Edit: actually, see below.
- solomatov 8y agoIANAL, but as far as I understand Apache 2.0, it grants patent license only in cases which were used in the original code, not universally.
- thekingofh 8y agoYou know what. I looked again at the license. I think this is the first time I've noticed a flaw in the Apache 2.0 license. I think you are right. Derived works is described as: "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof."
- scriptproof 8y agoThe future of Apple seems uncertain. Some says it is the beginning of the end. https://www.forbes.com/sites/stephenmcbride1/2019/01/21/the-end-of-apple/ https://www.forbes.com/sites/stephenmcbride1/2019/01/21/the-... Maybe the rescue plan is to become a patent troll?
- SkeptinenSpede5 8y agoTime to leave swift alone, so many times Apple is shown to be untrusted organisation
- empath75 8y agohttps://patents.justia.com/patent/9952841 https://patents.justia.com/patent/9952841 This is the actual patent. I'm having a very difficult time understand what their actual claims are -- can someone explain it?
- pnw_hazor 8y agoRead the claims section. That is what this patent protects.
- uberman 8y agoI don't quite understand. 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?
- anonuser123456 8y agoThis is how I interpreted it. It doesn't seem to patent a feature in as much as Swift itself. 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.
- 3JPLW 8y ago> 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.
- int_19h 8y agoRemember that each claim stands by itself, unless it explicitly evokes another claim.
- DannyBee 8y agoIP lawyer here. You should ignore everything but the claims, and see what the claims say. So stare at https://patents.google.com/patent/US9952841B2/en https://patents.google.com/patent/US9952841B2/en and look only at the claims. To me, that set of claims is ... worrying
- 8y ago
- judge2020 8y agoPatent text: https://patents.google.com/patent/US9952841/en https://patents.google.com/patent/US9952841/en I don't see how options chaining is specifically reserved, it's a patent on the entirety of Swift by the looks of it.
- basil-rash 8y agoYes... I really don't understand what all the FUD is about. I don't think most people here have read the actual text. Otherwise we'd have people complaining that Apple is trying to patent things like two stage compilation.
- thekingofh 8y agoIt looks like there is an unintended consequence of the Apache License 2.0 of allowing a company to patent some functionality, and the only way to acquire that patent is to keep your implementation as a close fork of the original derived work. The question is, whether or not the patent grant for just using swift (downloading and running it), can cover other development work that is not associated with swift. If not then Apache License 2.0 actually seems to paradoxically reinforce the situation it is trying to avoid by tying implementation and copyright directly to patents, thereby boosting patents as a way to squash other open source projects. Any comment by an Apache person would be greatly appreciated.
- fnord123 8y ago>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. 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. 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.
- slyrus 8y agoSo they're claiming (values) and &optional but in C?
- skrowl 8y agoAs if Apple isn't a big enough threat to tech by designing their software to be incompatible with everyone else's hardware, now they want to spam technology patents on a PROGRAMMING LANGUAGE. This is a horrible idea and only serves to stifle innovation. Please keep it in mind next time you purchase a laptop, smartphone or tablet!
- mikece 8y agoLet's see if I have this right: Apple is patenting concepts in Swift then licensing it under Apache 2 in order to protect users of the language from patent trolls. So they are patenting something for our protection?
- petecox 8y agoApache will only protect the particular implementation, viz. LLVM. 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.
- russh 8y agoYes, lets hope they don't alter the terms of the deal (again) at a further date.
- shmerl 8y agoClassic Apple hoarding software patents. Even if they don't use them, this looks like a threat move. Patenting programming language features is just sick. 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?
- pnw_hazor 8y agoThey have not patented any programming language features. 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.
- shmerl 8y agoThat doens't make it any less sick really (as applies to all software patents). But it's especially sick in the context of programming languages.
- pnw_hazor 8y agoIt is clear that you, like many commenters in this thread, have very little, if any, understanding of US patent law. 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.
- mishurov 8y agoDon't worry. Apple-toddlers will defend this anyway.
- techcarving 8y agoWow cool
- fabianhjr 8y agoJust to bring clarity on what has been patented on one of the patents: 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/OptionalChaining.html 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%2c841 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/ https://patents.google.com/patent/US9329844B2/
- stochastic_monk 8y agoRust does this as a core idiom. I don’t think this will work. Edit wrt edit in parent: all three of these claims apply to Rust.
- haimez 8y agoOr, you know, every typed functional language released in the last 30 years
- pnw_hazor 8y agoYour example can be implemented in many different ways. This patent claims one or more ways but not all of them. 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.
- pnw_hazor 8y agoOne strategy behind patenting open sourced inventions is to protect the users of the open source product.
- maxdesiatov 8y agoCould you please provide an example? From what specifically have any patents protected users of an open source product? I know plenty of examples when patents were used to harm the users, the most notorious one being Oracle and Java. But I don't remember a single case where users of an open source product were protected from anything with a patent owned by a big for-profit company, would be happy to know a concrete example that shows that this protection outweighs the risk of a company harming open source users.
- oflannabhra 8y agoChris Lattner has commented on the OP: ----- 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?
- vageli 8y ago> >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. > 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.
- WalterBright 8y agoThis is why the D programming language is Boost licensed. Many other languages are adopting D features we could have patented, but did not and will not.
- kazinator 8y agoLisps that return nil for (car nil) are implementing "optional chaining". 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 https://en.wikipedia.org/wiki/League_for_Programming_Freedom
- pnw_hazor 8y agoYou are talking about language features. The patent protects how a compiler implements some features in a multi-target environment. Nothing to do with optional chaining.
- saagarjha 8y agoI'm having a hard time getting a clear picture what this actually entails. I am in violation if I reimplement Swift without forking the project (i.e. a "clean room reimplementation")? If I'm designing my own language, am I no longer allowed to include optional chaining? If so, I'm pretty disappointed with this direction, since it runs counter to the entire point of accessible programming languages, including many of the ideas that Swift itself uses. Imagine if there were patents on C: software development would be far further behind than it is today, because nobody would be able to make a compiler for it or reuse its syntax or features in any new programming languages. I'm not seeing any benefits aside from a vague "it protects Swift users from patent trolls", but I'm not sure I understand how this argument works.
- maxdesiatov 8y agoExactly this, thank you for summarizing this so well! I've tried to clarify this exact point at Swift Forums, but I haven't seen even a clarifying answer from anyone in the core team on this point. Everyone says "it protects Swift", but looks like this protection comes at a cost of the overall ecosystem.
- maxdesiatov 8y agoAnd also, "it protects Swift" in their context always means "it protects Apple's Swift" unfortunately
- jeremyjh 8y agoNo, it definitely applies protections to the entire Apache licensed work. People can fork it and make changes, rename the project and they will retain their patent license as long as they abide by the terms of the license.
- maxdesiatov 8y agobut what about reimplementing a compiler from scratch without reusing any of Apple's code? It wouldn't fall under a definition of Derivative Work under terms of Apache 2.0 then
- Dotnaught 8y agoDoes this have any implications for Google's effort to integrate Swift into Fuchsia?
- norswap 8y agoI'm left dreaming of a future when we have to pirate programming languages.
- norswap 8y agoWe're building tanks but we promiiiiise we'll only ever use them for defense!
- hyperpallium 8y agoI'm not using Swift, so I don't get rights conferred by the Apache license. I make a language with "Apple's" claimed invention. (EDITED) Apple sues me.
- favorited 8y agoNo. Did you look at the patent? "Optional chaining" is not one of the patent's claims. 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).
- hyperpallium 8y agoNo, I went by the posted link. It does't alter my point.
- deleted 8y ago[deleted]
- niutech 8y agoOMG, the U.S. patent system is so crazy and people are so scared of being sued for any dumb reason. Why don't you change it? I am glad that I live in the E.U., where the situation is saner.
- cannabis_sam 8y agoPatents are so literally rent-seeking that I cannot fathom why people support them.