[M3devel] whitespace rationale?

Randy Coleburn rcoleburn at scires.com
Fri Apr 18 21:56:28 CEST 2008


I have a Modula-3 style guide that I developed for my company a number of years ago.
If anyone is interested, I don't mind contributing it to the repository.
Regards,
Randy

>>> Jay <jayk123 at hotmail.com> 4/18/2008 12:32 PM >>>

I like the function names at the first column to find definitions, but lots of folks don't do that and it is rare/nonexistant in cm3. :(
Granted, your way doesn't require a regexp search. Subtle, but also very useful, one of those things that most folks wouldn't think of -- not just style, but style with function. Of course, it's arbitrary which of the two ways, I think.
A parameter per line also eases diff/merge, but uses a lot of vertical space..

I still think it's worth coming up with a style and a rationale for new code. Not necessarily in this forum :). It's not all maintenance hopefully.
(And yeah I've heard of syntax tree editors that present the text in the user's preferred style.
Been an open research question for probably decades now. Plain text in regular file systems wins.)

- Jay

________________________________
> CC: m3devel at elegosoft.com 
> From: hosking at cs.purdue.edu 
> To: jayk123 at hotmail.com 
> Subject: Re: [M3devel] whitespace rationale?
> Date: Fri, 18 Apr 2008 12:02:04 -0400
> 
> Purely a matter of style.  I generally don't put the space for calls:
> 
> EVAL f();
> 
> but I do for declarations:
> 
> PROCEDURE f () = ...
> 
> just so that when I want to search for a local declaration I can easily do that with a text search for "f ()".  Just my 2 cents.
> 
> However, when editing code in any one style, I tend to preserve the style
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080418/cb79be4b/attachment-0002.html>


More information about the M3devel mailing list