[FRIAM] Whitespace
Roger Critchlow
rec at elf.org
Mon Sep 11 13:46:38 EDT 2006
My $0.02 is that it should be irrelevant, the language should be stored as
an Abstract Syntax Tree and pretty printed into whatever whitespace
decorated format the current programmer finds most interpretible, perhaps
borrowing some formatting quirks from the principal author of the code as an
identifying tag.
Legislating programming language whitespace is certainly better than wasting
years arguing about it, but there's really no reason to be arguing about it
at all. The only reason it comes up is because source code revision systems
are too stupid to store and compare the source code revisions, they store
and compare text file revisions and report differences in white space, and
many other nilpotent changes, as if they were source code changes.
-- rec --
On 9/11/06, Owen Densmore <owen at backspaces.net> wrote:
>
> Wow, I LOVE this! I know Ken from Sun days and he's one of those
> refreshing thinkers.
>
> We (our multimedia team at Sun) attempted a nifty stunt briefly for a
> large C++ project: At SCCS/CVS/SVN "check-in" run the code through a
> pretty printer using a common format. It also allowed folks to
> format in their own style, but the "official" version had a base format.
>
> BTW: This was one of my main concerns with python: it cannot be
> pretty-printed, at least at the block level. There is no "format"
> key in the IDEs. Shutter! Interestingly enough, btw, some folks
> feel that python *does* just what Ken suggests...it produces errors
> if you badly indent!!
>
> -- Owen
>
> Owen Densmore http://backspaces.net
>
>
> On Sep 11, 2006, at 10:16 AM, Robert Holmes wrote:
>
> > So which is "better" coding style, foo[ 0 ] + bar[ 0 ] or foo[0]+bar
> > [0]? Where exactly should your block delimiters go and should they
> > be indented? Here's a chap who suggests bypassing whitespace
> > debates by building the coding style into the language: if you
> > don't follow the style you generate a compiler error. Might seem
> > crazy, but I actually find it quite compelling, particularly for
> > projects where I'm collaborating on common code.
> >
> > http://www.artima.com/weblogs/viewpost.jsp?thread=74230
> >
> > Robert
> > ============================================================
> > FRIAM Applied Complexity Group listserv
> > Meets Fridays 9a-11:30 at cafe at St. John's College
> > lectures, archives, unsubscribe, maps at http://www.friam.org
>
>
> ============================================================
> FRIAM Applied Complexity Group listserv
> Meets Fridays 9a-11:30 at cafe at St. John's College
> lectures, archives, unsubscribe, maps at http://www.friam.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/friam_redfish.com/attachments/20060911/a64f6338/attachment.html
More information about the Friam
mailing list