5 ms·
Well, what is a good example? The proposal doesn't seem to have one. https://github.com/apple/swift-evolution/blob/master/proposals/0249-key-path-literal-func
by jmull 7y ago
Well, what is a good example?
The proposal doesn't seem to have one.
https://github.com/apple/swift-evolution/blob/master/proposals/0249-key-path-literal-function-expressions.md https://github.com/apple/swift-evolution/blob/master/proposa...
- zyang 7y agoSee last example. https://medium.com/joshtastic-blog/swift-keypaths-ea5a1ec880e9 https://medium.com/joshtastic-blog/swift-keypaths-ea5a1ec880...
- jmull 7y agoI mean an example of why this new language feature -- the ability to implicitly treat a keypath as a function -- is useful. (The last example in your link shows using a keypath to specify a sort criteria. That's a nice use of keypaths, but isn't helped by this new feature.)