On Fri, 2002-01-04 at 15:05, Bob Miller wrote:
> Yeah, sure, for a one man project, you don't need no steenking
> indentation rules. But think how nice it would be if you never had to
> grok through any other hacker's steaming pile of lazy formatting.
i agree. which is why there are books and guidelines on the subject.
most of which either go unread, unnoticed, or ignored.
my style of formatting is based on the one my boss uses. we have a
standard. if i can format my code the way i always write it, not only
do i not have to learn a new coding style, but neither does my boss.
thus making it easier for her and i to sit down and review my code, no
matter the language. as she puts it, once you learn a few languages,
the only differences are syntactical. the more i learn, the more i
realize that she is right. but python's syntax prevents me from writing
in a style that is similar no matter the language. were i to write my
current project in python, we'd both have to learn a new style as well
as a new language.
> The bigger the projects you work on, the more this matters. But it's
> a rare and antisocial hacker who reads his own code more than others'.
that's true. and it's one of the reasons i have for loathing perl. but
i can *make* perl nice if i really need to (just like my boss can
re-format machine-written SQL...) if i don't like the whitespace in
python, i have to live with it.
when working on large projects, any sane hackers will define or choose a
standard coding style and stick with it.
but python also discourages a particular programmer's "handwriting". i
could most likely pick my boss' code out of a random selection of SQL
stored procedures. with python, i can't tell. everybody's code looks
the same. (you will be assimilated... resistance is futile... :) )
> It's a lot like the GPL vs BSD license. The GPL seems onerous if you
> think of it as, "I have to release all my changes". But if you think
> of it as, "Everybody will have to give me all their changes," it looks
> a whole lot better.
actually, that is wrong. from the GPL FAQ :
Does the GPL require that source code of modified versions be posted to
the public?
The GPL does not require you to release your modified version. You
are free to make modifications and use them privately, without ever
releasing them. This applies to organizations (including companies),
too; an organization can make a modified version and use it internally
without ever releasing it outside the organization.
But if you release the modified version to the public in some way,
the GPL requires you to make the modified source code available to the
users, under the GPL.
Thus, the GPL gives permission to release the modified program in
certain ways, and not in other ways; but the decision of whether to
release it is up to you.
nor does the GPL require modifications to go through the original
author. so i don't have to send my modifications to you. you have to
go out and *find* them (or keep up with freshmeat... ;) )
so i still have a choice of style, whether using GPL or BSD license.
the choices are simply more limited under the GPL. there are no style
choices under python.
i still feel the above comparison is apples to oranges, tho. sorry...