> On Dec 17, 2015, at 23:50 , Brent Royal-Gordon via swift-evolution
> <[email protected]> wrote:
>
> I actually think that behavior instances should probably be private, and
> there should be no way to change that. Behaviors are inherently an
> implementation detail, and you should not be exposing them directly to users
> of your type. Instead, you should expose just the operations you expect to be
> needed through your own calls, which you can reimplement as needed.
I'm leaning in this direction too. The idea of exposing the behavior itself as
a value seems wrong for almost any client. "foo.prop.reset()" is slightly nicer
than "foo.resetProp()", but not if it conflicts with a 'reset' that's already
on the property type. "[email protected]()" certainly isn't an
improvement.
Jordan
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution