[swift-users] Design guidelines for computed property vs no-arg method
jens at bitcycle.com
Wed Jul 5 20:33:52 CDT 2017
On Wed, Jul 5, 2017 at 11:50 PM, Dave Abrahams via swift-users <
swift-users at swift.org> wrote:
> As a name, signum falls into the “term-of-art” category, so at least
> that part is in conformance to the guidelines. In specialized areas
> like this one, I generally defer to the domain experts, and IIRC our
> numerics people thought a function was more appropriate. In general,
> though, we were unable to come up with solid guidelines for the use of
> properties vs. functions. You can read more about this in the thread
> that starts here:
Thanks, I'll read that thread.
I am however noting that FloatingPoint.sign is a computed property.
Seems to me like the "term-of-art" category is a rather fussy and
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users