News for hackers. Stuff that matters.
Re:Apple is patenting Swift features by masklinn on Friday January 25, 2019 @10:02AM (#18998474)
FWIW 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".

Re:Apple is patenting Swift features by lalaithion on Friday January 25, 2019 @10:49AM (#18998936)
Right, 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?
Re:Apple is patenting Swift features by saghm on Friday January 25, 2019 @01:43PM (#19000983)
Ruby does seem to have the exact thing: http://mitrev.net/ruby/2015/11/13/the-operator-in-ruby/