On 10/22/06, <b class="gmail_sendername">Neil Mitchell</b> &lt;<a href="mailto:ndmitchell@gmail.com">ndmitchell@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br><br>&gt; In order to solve the trouble I propose enhancements<br>&gt; to teachers, compilers and standard libraries:<br>&gt; 1. 'if' syntax should be teached as<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then b<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else c
<br><br>I love being able to ident if however I like:</blockquote><div><br>I agree with Henning. Reserved syntax for &quot;if&quot; is totally unnecessary in Haskell. It requires three keywords. Its costs (syntax wise) seem much greater than its benefits (which are practically zero). I don't think that it makes sense to make further complicate this unnecessary syntax. Instead, why not work on eliminating the special syntax altogether? For example, make the &quot;then&quot; and &quot;else&quot; keywords optional and schedule them for removal in the next revision.
<br><br>Hennings suggestion that implementations suggest the correct indention is a good one.&nbsp; The existing Haskell implementations do not do a good job diagnosing layout problems. As far as I know, they don't even try to recover from syntax errors at all. I would like to change both of these problems. The proposed layout changes (NondecreasingIndention and DoAndifThenElse and the one for case) should be postponed until more work on error diangosis and recovery has been done.
<br><br>Regards,<br>Brian<br></div></div>