[swift-evolution] Should we rename "class" when referring to protocol conformance?

David Sweeris davesweeris at mac.com
Thu May 5 00:57:23 CDT 2016


> On May 4, 2016, at 13:29, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> In order for something like AnyValue to have meaning, we need to impose
> greater order.  After thinking through many approaches over the years, I
> have arrived at the (admittedly rather drastic) opinion that the
> language should effectively outlaw the creation of structs and enums
> that don't have value semantics.  (I have no problem with the idea that
> immutable classes that want to act as values should be wrapped in a
> struct).  The language could then do lots of things much more
> intelligently, such as correctly generating implementations of equality. 
You mean that a struct's properties would have to have value semantics, too? I think I'm okay with that, especially if it's done through new types of structs/enums.

- Dave Sweeris.


More information about the swift-evolution mailing list