[swift-evolution] [swift-evolution-announce] [Re-Review] SE-0104: Protocol-oriented integers

Max Moiseev moiseev at apple.com
Wed Feb 22 12:39:40 CST 2017


Free functions are much less discoverable. Think about the code completion, for example.

> On Feb 22, 2017, at 6:01 AM, David Sweeris <davesweeris at mac.com> wrote:
> 
> 
> On Feb 21, 2017, at 20:46, Xiaodi Wu via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
>> Sign, perhaps, can be thought of as "part of a number," but signum refers to the signum function (http://en.wikipedia.org/wiki/Sign_function <http://en.wikipedia.org/wiki/Sign_function>) defined as:
>> 
>> -1 if x < 0
>> 0 if x = 0
>> 1 if x > 0
>> 
>> 1 isn't really "part of" 42, for instance, at least not in the sense that 42 and + are "part of" 42.
> 
> Should it be a stand-alone function, then?
> 
> - Dave Sweeris 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170222/9df53988/attachment.html>


More information about the swift-evolution mailing list