[swift-users] Why can't structs inherit from other structs?
    Brent Royal-Gordon 
    brent at architechies.com
       
    Tue Aug  2 23:25:57 CDT 2016
    
    
  
> On Aug 2, 2016, at 8:44 PM, Tino Heth via swift-users <swift-users at swift.org> wrote:
> 
> * yes, an embedded "address"-struct would be an alternative — but copy & paste or writing everything in assembler is an alternative as well ;-)
The other alternative for this particular case is a Person protocol which Customer and Employee both conform to. Protocols currently require you to redeclare their properties, but we could add a feature to change that if there was a strong enough justification.
-- 
Brent Royal-Gordon
Architechies
    
    
More information about the swift-users
mailing list