--- Mathieu Bouchard matju@artengine.ca wrote:
On Thu, 27 Sep 2007, Sergei Steshenko wrote:
- if no formatting is enforced on a project, nobody is repelled, since
everybody has the possibility/freedom to write code the way he/she likes;
No, they can be repelled by the formatting that is already used in the project, and they have at least to keep existing code formatted the same way, because reformatting will be frowned upon at least to the extent that you do it as part of a cvs commit that is about something else than reformatting. I mean, if you use your own reformatter on whole files, you will have to undo its effect on the already existing code after you modify the code and before you submit, yes?
- if formatting is considered necessary, it'd better be done automatically
in order not to repell contributors who prefer a different formatting style.
I consider formatting to be rather close to necessary and yet I employ a style of formatting that isn't close to being supported by any automatic formatting tool. I'm not sure when I will ever try to make a tool for it, but it isn't that likely that I'll ever try. That said, if someone sent me a diff that uses a different formatting, I wouldn't reject it (at least not for that reason!).
And, by the way, I have nothing against macros.
Excellent.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
And why simply not keep in the repository both formatted by user and as a result of it automatically reformatted files ?
Disk space is cheap nowadays; everybody can edit his/her files the way he/she likes; small patches to files written by others can be reformatted manually by the code owner to his/her liking.
If I have to make a change in somebody else's file, I'll first reformat it anyway - otherwise I simply won't be able to understand it.
Then I'll make the changes and debug them.
Then I'll calculate diffs with the original reformatted file before semantic changes.
Then I'll try to apply the changes to the original file before changes using the original author's style.
Then I'll calculate diffs to be used as patches to be submitted to the original author.
The above is painful ...
Regards, Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________ Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/