<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br>On 10 Dec 2015, at 20:44, James Noble <<a href="mailto:kjx@ecs.vuw.ac.nz">kjx@ecs.vuw.ac.nz</a>> wrote:<br><br><blockquote type="cite">OK so what are the options here? <br><br>- requiring []s as sequences to be in parenthesis <br>- requiring no spaces before [] as indexing (which would also work well with <> as generics) <br><br>any others?<br></blockquote><br><div>Yes — not using [ ] as an operator.</div><div><br></div><div>If we think that “surround” operators are important, then we should come up with general support for them. Floor, ceiling, and absolute value are the common cases that I can think of. Then [ ] for indexing could be one of them. But I don’t think that we should introduce special syntax for a single special case.</div><div><br></div><div>Personally, I think that with infix and prefix operators we are have enough, and that it’s not worth complicating the language to add surround operators.</div><div><br></div><div>Using < and > as brackets is also a bad idea. They are operators. For type parameters, we should use something like ⟦ and ⟧ or [| and |] as ASCII equivalents.</div><div>(We can’t use [[ and ]], because they now mean a sequence containing a sequence …).</div><div><br></div><div>Neither I nor Kim use [ ] with the meaning of `.at` when teaching. The notation a[i] := expr is actually misleading, when compared to <a href="http://a.at">a.at</a> (i) put (expr). The latter is clearly an operation on the object a. The former makes a[i] look like a variable. </div><div><br></div><div>There will always be matters of taste in spacing. Do <i>you</i> put spaces in requests like `at (i) put (expr)`? How many? Where? Do we want to legislate this, or leave it up to students to develop their own sense of style. </div><div><br></div><div>Yes, we do require a certain pattern of indentation, although to date we have refrained from insisting that all { indents are 4 spaces,a nd all continuation lines 6 spaces. There is a benefit to this: no semicolons, which outweighs the cost. I think that there ia also broad agreement that indentation is essential for readability.</div><div><br></div><div>Incidentally, I believe that the “indent file” commas in the web IDE now works. I should make it available as a stand-alone program. </div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Andrew</div><div><br></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div></body></html>