Article View: comp.lang.java.advocacy
Article #100Re: Which one for Newbie (Java - Eclipse or JBuilder)
From: Ryan Breidenbach
Date: Tue, 16 Jul 2002 22:08
Date: Tue, 16 Jul 2002 22:08
59 lines
3695 bytes
3695 bytes
"Sam" <sam@theclearout.uk.co> wrote in message news:<ah1k6f$6v2$1@helle.btinternet.com>...
> > Spaces just make no sense whatsoever.
>
> Couldn't agree more, and I can't believe people are actually arguing the
> opposite.
To me, it is just the opposite - tabs make no sense whatsoever. Tabs'
spacing is interpretted differently from one editor to the other,
spaces are constant!Here is an example of why I hate tabs...
Say somebody is happily coding along, and they like to use tabs. They
like to indent their code four spaces, so that is what they have their
tabs set for. Suppose they also like to line up variable names. They
also like to line up method arguments when their line spills over to
the next line. Their code may look something like this (I will insert
^ to represent all spaces that are actually tabs)
public class MyClass {
^^^^private int^^^ id;
^^^^private String name;
^^^^public static void someReallyLongMethodName(String one, String
two,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^String three) {
^^^^^^^^// body of method
}
}
Now, say I like my code indented two spaces, so that is what my tabs
are set to.
Here is what it looks like when I open it:
public class MyClass {
^^private int^ id;
^^private String name;
^^public static void someReallyLongMethodName(String one, String two,
^^^^^^^^^^^^^^^^^^^^^^^^String three) {
^^^^// body of method
}
}
It is totally f*&$ed up. So, explain to me why I would want use tabs.
What good are they? What the hell do they buy me? Nothing!!! Tabs are
INCONSISTENT. Spaces are CONSISTENT. Plus, they look like crap in many
"dumb" editors (and guess what, you may not always have emacs at your
disposal!).
There are plenty of holy wars you can engage in when it comes to
formatting styles. Where to put curly braces. To put a line break
before an else or a catch or not. Blah. Blah. Blah. IMO, this is not
one of them. You can look at almost any open source project's code
guidelines, and they explicitly ban tabs. Most documents of Java
coding style discourage tabs (e.g The Elements of Java Style). Tabs
suck. Peroid.
Ryan
Technical Details
Message-ID:
<55e900c9.0207161408.fb4c3b3@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<39mX8.71483$1D2.29419397@twister.socal.rr.com> <7emX8.89256$p85.2379351@twister.austin.rr.com> <IHvX8.90728$xy.31073401@twister.socal.rr.com> <JnBX8.80162$eF5.2524927@twister.austin.rr.com> <uy9cgw7ya.fsf@hotpop.com> <1aBY8.123284$q53.2971035@twister.austin.rr.com> <3D32F842.EC524346@geocities.com> <ImDY8.123314$q53.2997975@twister.austin.rr.com> <3D3399A2.60FE1538@geocities.com> <8mWY8.114665$eF5.3184024@twister.austin.rr.com> <ah1k6f$6v2$1@helle.btinternet.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb77,9881175998020bf0 X-Google-Attributes: gidfdb77,public X-Google-Thread: 10cf9d,9881175998020bf0 X-Google-Attributes: gid10cf9d,public X-Google-Thread: 10a146,9881175998020bf0 X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2002-07-16 15:08:56 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: ryan_breidenbach@hotmail.com (Ryan Breidenbach) Newsgroups: comp.lang.java.advocacy,comp.lang.java.programmer,borland.public.jbuilder.non-technical Subject: Re: Which one for Newbie (Java - Eclipse or JBuilder) Date: 16 Jul 2002 15:08:54 -0700 Organization: http://groups.google.com/ Lines: 59 Message-ID: <55e900c9.0207161408.fb4c3b3@posting.google.com> References: <39mX8.71483$1D2.29419397@twister.socal.rr.com> <7emX8.89256$p85.2379351@twister.austin.rr.com> <IHvX8.90728$xy.31073401@twister.socal.rr.com> <JnBX8.80162$eF5.2524927@twister.austin.rr.com> <uy9cgw7ya.fsf@hotpop.com> <1aBY8.123284$q53.2971035@twister.austin.rr.com> <3D32F842.EC524346@geocities.com> <ImDY8.123314$q53.2997975@twister.austin.rr.com> <3D3399A2.60FE1538@geocities.com> <8mWY8.114665$eF5.3184024@twister.austin.rr.com> <ah1k6f$6v2$1@helle.btinternet.com> NNTP-Posting-Host: 199.221.61.40 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1026857335 28996 127.0.0.1 (16 Jul 2002 22:08:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 16 Jul 2002 22:08:55 GMT