Editor Tab Expansion

Hal Daume III hdaume@ISI.EDU
Thu, 5 Dec 2002 10:44:27 -0800 (PST)


> As far as I understand it, I have 2 options:
> 
> 1. Use braces and semicolons and ignore the layout rules.

This is one option.

> Just to be sure, can I really, really forget about layout if I write fully
> braced and semicolonoized code?

Yes.

> Besides, is there any reason why the syntax is LET { decl1; decl2; ... } IN
> expr when LET and IN are sufficient enough to enclose the declarations?

because you can say:

  let x = y
      z = q
      w = l
  in  ...

so it needs to know where the boundaries between declarations are, hence
the need for semicolons.  therefore, if you have embedded lets, you need
braces to delimit them:

  let x = let y = z
              q = r
          in  l
  in  q

would be ambiguous without layout/braces&semis.

 - Hal

p.s., I'm surprised you're having difficulty with tabs; a few people have
had such problems, but usually there's an easy fix in the editor.  I don't
really know enough about this to say one way or another thogh...