9 ms·
These 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
by dmos62 8y ago
These 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?
- saghm 8y agoRuby does seem to have the exact thing: http://mitrev.net/ruby/2015/11/13/the-operator-in-ruby/ http://mitrev.net/ruby/2015/11/13/the-operator-in-ruby/
- _Codemonkeyism 8y agoGroovy had null (optional) chaining https://therealdanvega.com/blog/2013/08/20/groovys-null-safe-operator https://therealdanvega.com/blog/2013/08/20/groovys-null-safe...
- tasubotadas 8y agoand Kotlin https://kotlinlang.org/docs/reference/null-safety.html https://kotlinlang.org/docs/reference/null-safety.html
- vorg 8y agoIn Apache Groovy you need to write `a?.b?.c` for nullsafe chaining on both `b` and `c`. In the past, its project managers have discussed propagating nullsafety down the chain so you'd only need to write `a?.b.c` to make both `b` and `c` nullsafe, but they've never implemented it. Not sure if that's in Rust, Kotlin, C#, or Ruby, or in Groovy's Antlr 4 parser.
- dep_b 8y agoI'm also pretty sure I had it in C# before Swift was introduced.
- dotuser 8y agoone thing though, in swift you can actually mutate fields using optional chaining, e.g. person?.name = "Bob". you can't do that in c#. not sure about rust but in scala you would unwrap the optional with a foreach or something.
- rhodysurf 8y agoYeah and using optionals in rust vs swift makes rust super annoying to use because of that.
- zmmmmm 8y agoIn Groovy you can mutate through optional (null-safe) chaining, eg: x = [ foo: [ bar: 1] ] x.foo.bar // 1 x.boo?.bar // null because x.boo is null x.boo?.bar = 1 // succeeds even though x.boo is null x.boo // still null
- dotuser 8y agoI knew I had seen this somewhere else. I don't understand why C# doesn't support this since most C# code is mutable anyway. I can see why it doesn't fit well with functional languages but C# usually espouses pragmatism over purity and having this would clean up a lot boilerplate null checking.
- pnw_hazor 8y agoDo Rust and C# implement these features the same exact way as Apple claims in this patent? Patents protect how you something, not what you do.
- dotuser 8y agoTechnically speaking, C# does not have optionals so I don't think it can be argued that C# violates the patent unless it's generalized to include null propagation which operates on reference types.
- int_19h 8y agoC# Nullable<T> is optional for all purposes (a struct with .Value and .HasValue), it's just restricted to value types.
- dotuser 8y agoright, c#'s nullable types are the ultimate in syntactic sugar in that you can just use them like regular value types in most places without realizing they are monads underneath.
- int_19h 8y agoI wouldn't say they have substantially more syntactic sugar than other languages with the same. If you need to use them in the context that is not optional, you need to use HasValue/Value, or casts, or (since recent versions) pattern matching to extract the value. The only special sauce I can think of is that C# also implements null-lifting for most operators in the language, which is not necessarily a good thing because it treats null as "unknown" rather than "missing" - e.g. a + b works on int?, and will produce null if either a or b is null. With Boolean operators, it's even clearer - false & null is false, true | null is true, but true & null is null, and false | null is null. But quite often this is not what I actually want! If null really means that the value is missing, then a + b shouldn't even compile for optionals. But in practice, I'd say that vast majority of all uses of Nullable are to denote missing rather than indeterminate values.
- bad_user 8y agoThe Apache license covers derived works. 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.
- deleted 8y ago[deleted]
- solarkraft 8y agoThis is interesting because it raises questions about what is a fork. Can I fork Swift and throw out everything except for the patented part and then merge it with my project?
- criddell 8y agoJudges don't typically fall for stuff like that. Just because you created something by using the fork process, the end result after your giant purge isn't recognizable as a fork of Swift.
- _bxg1 8y agoAnd what about languages like JavaScript and Kotlin which have already integrated the optional-chaining operator themselves?
- hdra 8y agoThats not the only thing, no? Doesn't it also prevent e.g. other people/company from including that feature in their own programming language that doesn't use Swift at all?
- hopler 8y agoOnly if those people compete with Apple's profits.
- thekingofh 8y ago--edit-- see below comments.. this may not be so simple. 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.
- riskable 8y agoThe patent hasn't been granted to the world via the Apache license. The Apache license only covers the code in the Swift language. 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.
- thekingofh 8y agoI believe there is a flaw in the Apache License 2.0 here. If the patent grant only covers the code in question. If this is true, then it not only reinforces software patents, but reinforces implementations too.
- subb 8y agoI'm not too knowledgeable about patents, but maybe we need a "liberal" patent? Something that can't be used to sue other people, but protects you from being sued.
- snissn 8y agotheoretically publishing an explanation of the methods and not patenting it is sufficient
- kevin_thibedeau 8y agoNot since the US changed to first-to-file. A patent can be issued to another party and you can be sued for using your own invention. If an examiner never finds your prior art you're still on the hook to deal with the expensive legal process of defense and invalidation.
- pbhjpbhj 8y agoElsewhere prior use is an absolute defence against being sued for patent infringement; I've not seen USA caselaw on this specific issue but I can't see how it could be different. Prior use in public would count as "prior art" and void a patent too.
- snissn 8y agoI don't think first to file is relevant to prior art ( direct from attorneys for things I've tried to patent this year with medical devices)
- save_ferris 8y agoHow would that work? If company A receives a "defensive" patent on a technology design, and company B decides to use that patented design without a license, seems like they'd be able to without any recourse. In which case, does the patent system even make sense anymore? I think that's the bigger question in the context of software.
- 8y ago
- OnlyRepliesToBS 8y agolol
- eecc 8y agoOptional chaining? You mean Apple got a patent for flatMap?
- lenticular 8y agoDon't you just love the USPO? They are severely understaffed for the increasing rate of patents. Any other gov't agency would just form a backlog, but instead they just approve things with little examination.
- lern_too_spel 8y ago> These patents seem to be a countermeasure against patent trolls. 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-patents-over-no-poaching-deal-says-court-filing/ https://www.cnet.com/news/steve-jobs-threatened-palm-with-pa...
- cestith 8y agoIndeed. They sued Samsung for making a phone that was a rectangle with rounded corners as if every maker of watches, wallets, tables, beds, couches, previous cell phones, cafeteria trays, cars seats, coffee cups with handles, axe handles, power tools, sports rackets, three-ring binders, televisions, remote controls, radios, messenger bags, and briefcases didn't realize sharp pointy edges are uncomfortable.
- dragonwriter 8y agoThat was a design patent, not a utility patent; the former are more like trademarks in purpose than they are like utility patents.
- cestith 8y agoIndeed, but there's nothing distinct or original about the design elements. All sorts of products including electronics products already contained the obvious and practical elements.
- ummonk 8y agoFiling a patent on your art is a convenient way to put your prior art on the record against lawsuits by future patents.
- tokyodude 8y agosure it can. you make something patentable. say AR lenses. You write an iOS app in Swift. Apple copies your lenses. When you go try to sue them they point out lose the right to use Swift
- saghm 8y agoIs it actually a legitimate concern that a patent troll would be able to sustain a claim to syntactic sugar around a specific monad? It seems far more likely that a non-patent trolling entity would implement a similar feature in some other language (along with the languages that already have similar features) than a patent troll would sue and claim patent rights to it.