[m-dev.] For review: added string__words/2

Peter Schachte schachte at cs.mu.OZ.AU
Fri Apr 14 20:31:20 AEST 2000


On Fri, Apr 14, 2000 at 02:32:31AM -0700, Ralph Becket wrote:
> > > +words_0(SepP, String, WordEnd, Words0) = Words
> > > +:-
> > > +    ( if WordEnd < 0 then
> > > +        Words = Words0
> > > +      else
> > 
> > Normally we indent the `;' for an if-then-else at the same 
> > level as the
> > `('.  The Mercury coding guidelines don't explicitly discuss layout
> > for the `(if ... then ... else ...)' form, but IMHO it should 
> > match the layout for the `(... -> ... ; ...)' form.  (Any other 
> > opinions on this?)
> 
> I prefer my layout, to be honest.  I tried mimicking the `-> ;'
> layout style, but it just looks ugly IMHO.  Given that I seem to be
> the only person using long-hand, I would like a weighted vote on this
> issue :)

I agree with Ralph.  I see no reason to make the code a line longer.  Where
there's an `if', you know a `then' is coming, so why draw attention to it?

But then, I really hate having `->' and `;' on lines by themselves, too.

-- 
Peter Schachte                     True development puts first those that
mailto:schachte at cs.mu.OZ.AU        society puts last.
http://www.cs.mu.oz.au/~schachte/      -- Mahatma Gandhi 
Phone:  +61 3 8344 9166            
Fax:    +61 3 9348 1184            
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list