[Haskell-cafe] Indentation woes

Stefan O'Rear stefanor at cox.net
Thu Jul 26 20:31:56 EDT 2007


On Thu, Jul 26, 2007 at 08:17:06PM -0400, anon wrote:
> 2007/7/26, Stefan O'Rear <stefanor at cox.net>:
>> Out of curiousity, what do you find objectionable about (legal):
>>
>> function argument argument2
>>  | guard = body
>>  | guard = body
>>
>> as compared to (currently illegal):
>>
>> function argument argument2
>> | guard = body
>> | guard = body
>
> The extra space, obviously :-)
> I'm well aware that this is an issue of vanishingly small consequence,
> but one could likewise dismiss the entire layout business as a
> needlessly complicated way to save a few keystrokes if one were so
> inclined. If language complexity is the chief concern, why not
> dispense with layout altogether (and a few more things beside)?
> Perhaps fuzzy notions of aesthetics and intuitiveness should weigh
> into the equation as well unless you don't mind programming in the
> unadorned lambda calculus.

Definitely, and Haskell *was* designed to be aesthetic.  I suppose what
I'm really trying to ask is *why* you think the second should be legal.
To me it just seems like an ugly ad-hoc generalization, and ad-hoc
generalizations are something Haskell tries to avoid.

(There's a bit of background on the syntax design process in SPJ's
History of Haskell paper, page 10 of
http://research.microsoft.com/~simonpj/papers/history-of-haskell/history.pdf).

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070726/0c747e74/attachment.bin


More information about the Haskell-Cafe mailing list