by skohan · 7y ago · 0 comments
https://therealdanvega.com/blog/2013/08/20/groovys-null-safe...
Not sure if that's in Rust, Kotlin, C#, or Ruby, or in Groovy's Antlr 4 parser.
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".
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 nullPatents 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.