<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=""><div><blockquote type="cite" class=""><div class=""><div class="">foo.map( bar => bar.boz) // single line<br class=""></div></div></blockquote><div><br class=""></div>Well how important is it to use () instead of {} here?</div><div><br class=""></div><div>If you make it</div><div><br class=""></div><div>foo.map { bar => bar.boz }</div><div><br class=""></div><div>then it's like it is now, but with "in" replace by "=>".</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div class="">foo.map { (x, y) => x * 5 + y }<br class=""></div></div></blockquote><div><br class=""></div><div>I actually like the bare version:</div><div><br class=""></div><div>foo.map { x, y => x * 5 + y }</div><div><br class=""></div><div>but not in your example (here it looks atrocious). Take this real code, though:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; min-height: 16px;" class=""><br class=""></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> constrain(topBlock, tableView, view) { top, tbl, sup <span style="font-variant-ligatures: no-common-ligatures; color: #35568a" class="">in</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> top.left == sup.left + horizPadding</div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> top.right == sup.right - horizPadding</div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> top.top == sup.top + topPadding</div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; min-height: 16px;" class=""><br class=""></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> tbl.top == top.bottom + <span style="font-variant-ligatures: no-common-ligatures; color: #35568a" class="">16</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> tbl.bottom == sup.bottom</div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; min-height: 16px;" class=""><br class=""></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> tbl.left == sup.left + horizPadding - horizTableHang</div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> tbl.right == sup.right - horizPadding + horizTableHang</div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;" class=""> }</div><div class=""><br class=""></div><div class="">I think the lack of parens is beneficial in reducing the visual noise here.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">And yes, I certainly would prefer `=>` rather than `in`.</blockquote><div class=""><br class=""></div><div class="">It seems like the community can actually agree on this.</div><div class=""><br class=""></div><div class="">Does anyone know if it has any parsing problems / grammar implications right now? </div><br class=""><blockquote type="cite" class=""> I think a big problem with `in` is that it’s textual, and doesn’t provide a clear visual separation from keywords/names at the start of the body or the end of the type specifier.</blockquote><div class=""><br class=""></div><div class="">Yes, agreed. “Not delimited enough”.</div><br class=""><blockquote type="cite" class=""> (Are the [parentheses] around `bar` in your example required? I’m ambivalent to them.)<br class=""></blockquote><div class=""><br class=""></div><div class="">No, they are not, as shown above.</div><br class=""><blockquote type="cite" class="">To be clear, I’m still not a fan of the Ruby syntax. I think it makes the parsing easier for a compiler but harder for a human…</blockquote><div class=""><br class=""></div><div class="">Depends on the human. To this specific human, the Ruby-style one is the easiest to parse (and mind you, I had <i class="">very</i> limited experience with Ruby compared to other languages, so it's not just being used to it, but rather an honest love and preference).</div><div class=""><br class=""></div><div class="">A.</div></div><div class=""><br class=""></div></div></div></body></html>