Re: [swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Edward Connell via swift-users
Putting a struct with your common vars in it seems like it wouldn't work, because now it is a member and the vars aren't exposed on your object directly, so the outer struct wouldn't conform to the protocols. My original problem with inheritance is that you can't correctly adopt a protocol on a

Re: [swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Rien via swift-users
> On 11 Mar 2017, at 21:12, Edward Connell via swift-users > wrote: > > Observations about difining an object > • Structs can't inherit and classes shouldn't inherit, final concrete > types should be flat Why? I always default to the position that we should do

Re: [swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Jens Alfke via swift-users
> On Mar 11, 2017, at 10:21 PM, David Sweeris wrote: > >> (I see absolutely nothing wrong with inheritance, and it solves exactly this >> sort of problem. Yes, structs can’t inherit, but they can contain a common >> struct as a member, which is quite similar and addresses

Re: [swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Jens Alfke via swift-users
> On Mar 11, 2017, at 12:12 PM, Edward Connell via swift-users > wrote: > > It seems that an easy workaround would be an #include statement. > The boiler plate can be put in a separate file and included wherever it's > needed. IMHO this seems like a surefire ‘design

Re: [swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Dave Reed via swift-users
> On Mar 11, 2017, at 3:12 PM, Edward Connell via swift-users > wrote: > > Observations about difining an object > • Structs can't inherit and classes shouldn't inherit, final concrete > types should be flat > • Protocols need to be adopted by the final

[swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Edward Connell via swift-users
Observations about difining an object - Structs can't inherit and classes shouldn't inherit, final concrete types should be flat - Protocols need to be adopted by the final concrete type, otherwise constraint specializations aren't correctly applied This creates a really ugly code