RE: [PATCH] AT2 rewrites (resubmit)
Andreas Fink <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <p05111b07b98abecf8318@[193.53.0.55]> |
> > The idea in that is that most of the computer systems in the >> world has >> been configured so that tab is 8. If we change that, then all >> kind of cat, >> more, less, print etc. outputs of the source code get f*d up >> unless tab >> size of those is also modified to 8. > >not so - since the Coding style document clearly state that tabs >should not be saved to disk but replaces with spaces - so all these >tools wouldn't mind at all as they will not be seeing tabs but only >spaces. > >> Why can't you people just get an editor that auto-indents >> with spaces? :] > >Isn't that the whole point ? I have an editor which indents with >spaces (KDevelop). All the Kannel sources either do not have tab >stops at all, or very little - so how about just forgetting about >tab stops completly ? Again, to edit, you would expect to type TAB, not ever editor allows to simply put spaces up to the next 4. Also if you delete one space its gets messy. So really it means typing spaces BY HAND which I consider really bad practice. My faviourite programmers editor BBEdit has syntax coloring and all the nice tools you want to have as a developer like open and save from/to FTP show function names etc. I would consider that a professional tool for writing code. It allows me to do ENTAB and DETAB text. But this would mean entab-ing before editing and detabing after editing to only have spaces in the output. Franky I think the result would be that we see tons of CVS updates only replacing spaces with tabs and vice versa. Those editors who are using spaces as replacements for tabs are from the days where you had no GUI, no mouse and no WYSIWIG. Sometimes you have to use them (like I use vi from time to time) but setting tabstops to 4 there is one command, doing space only in newer editors is nowhere an option (at least I have not seen any programmer's editor who does that on a modern operating system like MacOS X, Linux with X or MS-Windows. I dont want to start a religious debate here but it would for sure help readability if we would replace 4space with real tabs because often they are not 4 but 3 or 5 and once you've noticed, you start changing 10 lines you just wrote. And when you want to ident because you added an if() in the front, the editing gets worse. On the other side I think it is safe to say than a tabstop of 4 / ident of 4 is readable (thats what we visually have today) and that EVERY EDITOR, even very old vi from the 80's can have set the tabstop to another default. (in vi this is ":set ts=4", can be put in .virc or even typed every time in the worst case. still better than to type all those spaces.). -- Andreas Fink Fink-Consulting ------------------------------------------------------------------ Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [email protected] Homepage: http://www.finkconsulting.com ------------------------------------------------------------------ Something urgent? Try http://www.smsrelay.com/ Nickname afink