[swift-evolution] [Review] SE-0023 API Design Guidelines (when to use properties)
Charles Kissinger
crk at akkyra.com
Thu Jan 28 00:23:59 CST 2016
> On Jan 27, 2016, at 11:23 AM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 1. I don't know how to nail down what was meant by “intrinsic” in:
>
> Things that are “intrinsic” to the receiver are properties
How about: If something is, or logically could be, a value stored in memory as part of the object, it is intrinsic.
> 3. I don't understand the rationale we currently have for
> sequence.iterator() not being a property, even though I think that's
> the right choice.
To me, a sequence.iterator property would suggest there is one such thing that is intrinsic to the sequence. A sequence.iterator() method better expresses the idea that there can be multiple independent iterators existing at once (for multi-pass sequences anyway).
—CK
> --
> -Dave
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list