> On Dec 25, 2016, at 13:24, Chris Lattner via swift-evolution
> <[email protected]> wrote:
>
>> On Dec 25, 2016, at 12:54 PM, Adam Nemecek via swift-evolution
>> <[email protected]> wrote:
>> Does enabling a lot of small improvements that make APIs more ergonomic
>> count as practical?
>
> Yes, that would count as practical, but Xiaodi’s question is just as
> important. *Which* APIs become more ergonomic?
>
> Here are a couple of more questions:
>
> 1) How does this square with Swift’s general philosophy to not default
> initialize values to “zero”?
>
> 2) To your original example, it isn’t immediately clear to me that reduce
> should choose a default identity. Some types (e.g. integers and FP) belong
> to multiple different ring algebras, and therefore have different identity
> values that correspond to the relevant binary operations.
Would generic protocols solve #2? "func addStuff<T:
Addable&HasIdentity<Addable>> (...) -> T {...}"? If so, does that affect the
reasoning behind #1?
- Dave Sweeris_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution