[Haskell] offside rule question

Frederik Eaton frederik at a5.repetae.net
Thu Jul 14 19:22:32 EDT 2005


On Thu, Jul 14, 2005 at 03:15:32AM +0200, Lennart Augustsson wrote:
> The offside rule is patronizing. :)
> It tries to force you to lay out your program in a certain way.
> If you like that way, good. 

I disagree. The offside rule in general makes a more concise syntax
available to the programmer, who would probably choose a similar
indentation style anyway. The issue that I brought up is a case where
the programmer is *prevented* from using a certain syntax, for the
sole reason that, if what you say is correct, someone has determined
that the prohibition is "good for him". I dislike such design
rationales because they always end up hurting advanced users, who may
have atypical needs, but who should ideally play an important role in
promoting the language to others; it makes it seem like the plan is
instead to hype the language to managers with the intent that they
force it on their subordinates as a "regimen" rather than as a
flexible tool. I don't really think that this example is such a big
deal, since it is so easy to work around, I just wanted to say what I
meant by "patronizing". You'll find a great deal of better bad
examples in "The Design and Evolution of C++". :)

Frederik

> If you don't like that way, you can use {;} as you say.
>
> 	-- Lennart
> 
> Frederik Eaton wrote:
> >Huh, that seems patronizing. Well at least I can override it with {}.
> >
> >Thanks,
> >
> >Frederik
> >
> >On Thu, Jul 14, 2005 at 02:42:53AM +0200, Lennart Augustsson wrote:
> >
> >>That's how it is defined in the Haskell definition.
> >>
> >>But there is a reason.  The offside rule (or whatever yoy want to
> >>call it) is there to give visual cues.  If you were allowed to override
> >>these easily just because it's parsable in principle then your code
> >>would no longer have these visual cues that make Haskell code fairly
> >>easy to read.
> >>
> >>	-- Lennart
> 


More information about the Haskell mailing list