<html><body><div>Hi Swift,</div><div><br data-mce-bogus="1"></div><div>Since the "removal" of curried function, I am looking for some elegant ways to work with partial functions (and reduce creation of closure and nested func for the developper).</div><div><br data-mce-bogus="1"></div><div>And now I am asking myself if it's not better to align operator's types to the arrow style instead of using tuple argument style.</div><div><br data-mce-bogus="1"></div><div>For example: </div><div>Why Int.multiplyWithOverflow's type is <span style="line-height: 1.5;" data-mce-style="line-height: 1.5;">(Int, Int) -> (Int, overflow: Bool) instead of (Int -> Int) -> (Int, overflow: Bool)</span></div><div><span style="line-height: 1.5;" data-mce-style="line-height: 1.5;"><br data-mce-bogus="1"></span></div><div><span style="line-height: 1.5;" data-mce-style="line-height: 1.5;">When curried function will come back (if it come back, which is a personal hope) that will avoid many refactoring.</span></div><div><span style="line-height: 1.5;" data-mce-style="line-height: 1.5;"><br data-mce-bogus="1"></span></div><div><span style="line-height: 1.5;" data-mce-style="line-height: 1.5;">I think that, write this : </span>let f:(Int, Int) throws -> Int = (+) seem a bit ugly for this purpose <p class="p1"><span class="s1">let f:(Int -> Int) -> Int = (+) seem more suitable.</span></p><p class="p1"><span class="s1">We could imagine that in the future the compile could automatically create a closure if the programmer define something like <p class="p1">let lmul: (Int) -> (Int) -> (Int) = (*)</p><p class="p1"><span class="s1">and then, doing the habitual stuffs : let mulOfTwo = lmul(2)</span></p> </span></p></div><div></div><div>Kind regards,</div><div class="x-apple-signature"><pre style="font-family: 'SFNSText','Helvetica Neue', Helvetica, sans-serif; font-size: 15px; white-space: pre-wrap; word-wrap: break-word;" data-mce-style="font-family: 'SFNSText','Helvetica Neue', Helvetica, sans-serif; font-size: 15px; white-space: pre-wrap; word-wrap: break-word;">--
jcnm</pre></div></body></html>