<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Aug 1, 2016, at 3:01 PM, Anton Zhilin via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">2016-08-02 0:52 GMT+03:00 Xiaodi Wu <span dir="ltr" class=""><<a href="mailto:xiaodi.wu@gmail.com" target="_blank" class="">xiaodi.wu@gmail.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><span class="">On Mon, Aug 1, 2016 at 4:41 PM, Anton Zhilin via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Disclaimer: I have not (yet) prepared a proposal, or even something that could be considered a draft, but I want to hear public opinion on the topic.<div class=""><br class=""></div><div class="">SE-0077 (about precedence groups) has been successfully implemented for Swift 3. (A thousand thanks to John McCall!) It suggests a model where we can prohibit certain operators from standing next to each other.</div><div class=""><br class=""></div><div class="">This was intended to be the second part of that proposal. We now have to think if we should drop some precedence relationships between standard operators. Here are examples of parentheses dropping that can be ambiguous to reader:</div><div class=""><br class=""></div><div class="">1/3 as Double // should we prohibit this?</div></div></blockquote><div class=""><br class=""></div></span><div class="">Why should we? I would absolutely want that to work exactly as it does now (0.333333...).</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Strange enough, I've just run it and yes, 0.333333... But casting precedence is lower than multiplicative, so I thought it would parse as '(1/3) as Double'. Is it a bug?</div></div></div></div></div></blockquote><div><br class=""></div>You're applying C-style thinking. Swift does not have implicit promotions. Coercing the result of 1/3 to Double forces the operands to be Doubles as well.</div><div><br class=""></div><div>John.</div></body></html>