<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><blockquote type="cite" class="">On Mar 11, 2017, at 3:17 PM, Jaden Geller via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""></blockquote><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">As I understood it, omitting the type would work identically to `let` declarations. A string literal without a type defaults to `String`. Treating it as a generic function is a bad idea IMO.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I don't think this sugar is worth any amount of added complexity. Most function arguments will have not have default values and this have to continue to declare the type, so this would only be more concise in very few cases. I'd prefer the consistency of always having to explicitly declare the argument type at a function boundary.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">To call a function, you need to know what type to pass in. This becomes more difficult when not make explicit, particularly when a more complicated expression is used as a default. -1</div></div></blockquote></div><br class=""><div class="">When you declare a property with an inferred type, it shows with the explicit type in the generated interface. So:</div><div class=""><br class=""></div><div class="">public struct S {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>public let foo = 3</div><div class="">}</div><div class=""><br class=""></div><div class="">becomes:</div><div class=""><br class=""></div><div class="">public struct S {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>public let foo: Int</div><div class="">}</div><div class=""><br class=""></div><div class="">I would presume that the same rule would apply to default parameters in function declarations (although to be fair, I’m also uncertain that we actually need this).</div><div class=""><br class=""></div><div class="">Charles</div><div class=""><br class=""></div></body></html>