Live data from Hacker News

Apple is patenting Swift features

forums.swift.org

181–190 of 223 posts

Re: Apple is patenting Swift features

#181
post #67

Let'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?

Apache 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.

Re: Apple is patenting Swift features

#182
post #2

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…

> 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…

Filing a patent on your art is a convenient way to put your prior art on the record against lawsuits by future patents.

Re: Apple is patenting Swift features

#183
post #2

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…

sure 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

Re: Apple is patenting Swift features

#185

I'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.

No. 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).

Re: Apple is patenting Swift features

#186

I'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.

No. 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…

No, I went by the posted link. It does't alter my point.

Re: Apple is patenting Swift features

#187
post #169
post #71

Earlier quoted context omitted.

one 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.

In 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

I 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.

Re: Apple is patenting Swift features

#188

Just 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/OptionalChai... ) EDIT: The second one lin…

Rust 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.

Or, you know, every typed functional language released in the last 30 years

Re: Apple is patenting Swift features

#189

Earlier quoted context omitted.

Technically 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.

C# Nullable is optional for all purposes (a struct with .Value and .HasValue), it's just restricted to value types.

right, 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.

Re: Apple is patenting Swift features

#190

Earlier quoted context omitted.

No, 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.

but 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

If your going this way you must also take account for "reimplementation from scratch under restrictive licence”.

Apache license don’t say anything about clean room reimplementation under other licence because it’s a tricky subject beyond the scope of the license. I personally think that if someone reimplement Swift, name it Schwift, guarantee it’s 200% faster (for some reasons), and then sell commercial licence of that it should be sued (but with such business plan I believe he’ll go bankrupt first).

Apple logically won’t comment on what they will do in case of a "clean room" implementation because they have zero interest in anybody doing such a thing.

And actually nobody have any interest in such a monstrosity (except maybe for theological reasons?). The project is goddam Appache2, fork it if you want, but spending any second trying to reimplement years of works is a total waste of time. Want to start something from scratch? Fine but do something original. Want to improve swift ecosystem ? Fine but work on the main project or on a clean fork!

Post reply on HN