[Haskell-cafe] Layout rule

Ketil Malde ketil+haskell at ii.uib.no
Wed Mar 1 02:41:30 EST 2006


"Brian Hulley" <brianh at metamilk.com> writes:

>> You can't be serious. This would cause far more problems than the
>> current rule.

> Why? Surely typing one tab is better than having to hit the spacebar 4
> (or 8) times?

What you type depends on your editor.  I hit tab, and the editor
inserts an appropriate number of spaces.  (I thought all editors did
this now?)

> There was an example posted on another thread where someone had got
> into confusion by using ; after a let binding in a do construct with
> an explicit brace after the 'do' but not after the 'let' (sorry I
> can't find it again).

> If you allow {- everything becomes a lot
> more complicated and who needs them anyway?

Multi line comments are nice for commenting out blocks of code.  It is
much less intrusive, in particular if you're using version control.

> back to editing a function at the top of a file. Things like {- would
> mean that all the parse trees for everything after it would have to be
> discarded. Also, flashing of highlighting on this scale could be very
> annoying for a user, so I'd rather just delete this particular
> possibility of the user getting annoyed when using my software :-)

Couldn't your editor just be a little bit smarter?  E.g. count the {-s
and -}s, and only comment-hilight them if there are two of them?
Retain a history of old parse trees, so that it is quick to return to
a previous one?

> Haskell, which in turn might lead to more people understanding and
> therefore using the language, more libraries, more possibilities for

You forget one thing:

"Avoid success at all costs"

:-)

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell-Cafe mailing list