>> This is a language that has put protocol centerstage. It stands to reason 
>> express something as essential using a protocol. 
>> 
>> protocol Nothing {}  
>> 
>> seems more than rational
> 
> No, this doesn't make sense as a protocol. You should not be able to conform 
> to Nothing, but you could conform to this protocol. You *should* be able to 
> cast anything to Nothing, which this definition doesn't allow. You should be 
> able to call any method, property, or subscript on Nothing* (none of them 
> will actually work), but Nothing has no methods. A `protocol Nothing` is, 
> frankly, the exact *opposite* of what Nothing should be.

Interesting viewpoint. My only issue with it is that it tends to perpetuate the 
magic that exists between compiler and stdlib: there are many areas where they 
seem to be gratuitiously joined at the hip by shared secret hanshakes. 

> 
> 
> * At least notionally. It wouldn't be wrong to omit that as clever, but 
> pointless.
> 
> -- 
> Brent Royal-Gordon
> Architechies
> 
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to