[swift-evolution] Splat
Joe Groff
jgroff at apple.com
Wed Feb 10 16:12:33 CST 2016
> On Feb 10, 2016, at 1:47 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> On Feb 10, 2016, at 1:21 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>>
>>
>> P.S. As for pointers potentially using prefix `*` for memory dereferencing, I would instead make them use postfix `!`. `!` could become an `unwrapped` pseudo-property that any type can use, democratizing another piece of `Optional` magic and working around the vexing problem of what you name the `Pointer` property for "that thing you're actually pointing to".
>
> FWIW, I’m +1 on eliminating magic in the compiler and moving it to the stdlib (postfix ! is one example of that, I don’t recall offhand what prevents it from moving). However, I’d be reticent to start using ! for safe operations like dereferencing a (guaranteed memory safe) pointer.
'!' produces an lvalue if its operand is an lvalue, which is something user-defined operators are currently unable to do.
-Joe
More information about the swift-evolution
mailing list