[wp-hackers] Please, please PLEASE use tabs instead of spaces!
John Watson
johnw1 at gmail.com
Mon Aug 30 18:11:59 UTC 2004
Well, it depends on how picky you are about lining things up,
especially on deep indents. For example:
$somestringvariable = "hello world"
."some more text"
."and somre more"
If you like those quotes to line up, you might use something like 11
tabs (set at 2). If my tabs are set at 4 then the display won't be
anything like what you intended and in fact might be quite ugly (and
it goes badly the opposite way, too). Also, with tabs, you sometimes
have to add an extra space or two when the position you want to indent
to isn't aligned with a tab. If you really want comformity then you
need to also specify the tab size and an indent policy for situations
like the above example. :-)
In the end though it doesn't really matter and the wordpress coding
style guidelines (http://wordpress.org/docs/developer/coding-style/)
say to use real tabs instead of spaces. So, there you go.
On Mon, 30 Aug 2004 17:39:28 +0100, David House <dave at xmouse.ithium.net> wrote:
> Quoting smea gol <logicus at gmail.com>:
>
> > Spaces look more uniform though, while tabs are often set differently
> > on different editors.
>
> So? The owner of the editor would prefer the indentation to be displayed at a
> distance that works for him/her: this is their tab length.
>
> > Also, occasionally when changing the
> > reindentation - you'd have to go back and add spaces anyways - since
> > tabs are set at a certain distance.
>
> Not entirely sure what you mean, but tabs are certainly good enough to cover
> every type of situation.
>
> > The php parser ignores spaces anyways, so it really isn't that big of a
> > deal.
>
> Still a reduction in filesize, if not in parse speed.
More information about the hackers
mailing list