[swift-evolution] [Review] SE-0055 Make unsafe pointer nullability explicit using Optional

John McCall rjmccall at apple.com
Fri Mar 25 00:44:29 CDT 2016


> On Mar 24, 2016, at 9:43 PM, Chris Lattner <clattner at apple.com> wrote:
> On Mar 24, 2016, at 7:28 PM, John McCall via swift-evolution <swift-evolution at swift.org> wrote:
>> I'd actually be much more concerned about the pervasive assumptions about pointer representation in Clang and LLVM than I would be with Swift.
>> 
>> Now, it would probably be very annoying to support a platform where different pointer types had different null values, but the last of those died awhile ago, I believe.
> 
> The last significant one IIRC was Itanium, in the case of C++ member pointers (themselves an odd beast), which had a different representation than data pointers (-1 is null).

That's not really target-specific; it's equally true for everybody using that C++ ABI, including us.  But member pointers are a fundamentally different concept from C pointers, despite the name.

John.


More information about the swift-evolution mailing list