<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>On Dec 25, 2016, at 13:24, Chris Lattner via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8">On Dec 25, 2016, at 12:54 PM, Adam Nemecek via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<div><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">Does enabling a lot of small improvements that make APIs more ergonomic count as practical?</div></div></blockquote><div><br class=""></div><div>Yes, that would count as practical, but Xiaodi’s question is just as important. *Which* APIs become more ergonomic?</div><div><br class=""></div><div>Here are a couple of more questions:</div><div><br class=""></div><div>1) How does this square with Swift’s general philosophy to not default initialize values to “zero”?</div><div><br class=""></div><div>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.</div></div></blockquote><br><div>Would generic protocols solve #2? "func addStuff<T: Addable&HasIdentity<Addable>> (...) -> T {...}"? If so, does that affect the reasoning behind #1?</div><div><br></div><div>- Dave Sweeris</div></body></html>