Re: [swift-users] CustomStringConvertible?

2017-09-08 Thread Rien via swift-users
Ah, yes. It is possible to ‘store’ it as a fixed string. But I would still expect the compiler to treat it as if it were a computed property. Given that this is a protocol and a protocol cannot define stored properties. (yet anyway) OTOH, what do I know about compilers… lol! Regards, Rien Site:

Re: [swift-users] CustomStringConvertible?

2017-09-08 Thread Michael Rogers via swift-users
Thanks for your reply, Rien. I just tried this again, and now it seems that either is acceptable. Seems a little weird, but I guess I’d rather have more flexibility than less. protocol Powerable { var isOn:Bool { get set } // Must have get and set var usesDC:Bool { get } // Must have get

Re: [swift-users] CustomStringConvertible?

2017-09-08 Thread Rien via swift-users
It cannot be ‘stored’ I would think. I always compute my implementations. Regards, Rien Site: http://balancingrock.nl Blog: http://swiftrien.blogspot.com Github: http://github.com/Balancingrock Project: http://swiftfire.nl - An HTTP(S) web server framework in Swift > On 08 Sep 2017, at 19:

[swift-users] CustomStringConvertible?

2017-09-08 Thread Michael Rogers via swift-users
Quick question (for my own edification, as well as to demonstrate to my students the power of this mail list 😉), is CustomStringConvertible a stored property or a computed property? The docs say the latter, but when using Xcode’s fabulous FIX button, it seems to imply it’s a stored property. M