Re: Stylistic note on loops
On Mon, 25 Oct 2010, Jim Janney wrote:
Tom Anderson <firstname.lastname@example.org> writes:
On Fri, 22 Oct 2010, markspace wrote:
On 10/21/2010 11:48 PM, BGB / cr88192 wrote:
apart from a few edge cases: the big ugly block of characters; the
ugly 1 or 2-space tab (luckily, this one has largely died off, as
the 4 or 8 space tab are near-universal);
In my experience, tabs died out a decade ago. All indentation is
with spaces now. I always favored tabs myself, but the world has
moved on. Que sera sera.
Seriously? We use nothing but where i work. In java and XML, at least
for some reason, in JSP (well, HTML, really) we tend use two spaces. I
think because JSP/HTML tends to have much more deeply nested
I think our use of tabs must stem from the fact that Eclipse, by
default, uses tabs for indentation. They must have a reason to do that.
The trouble with tabs is that everyone has a different idea of what the
spacing should be, and they rarely bother to document it because it's so
obviously the one true way. This is manageable in a smallish office
environment but for distributed projects it turns into a complete mess.
I've seen source files where different sections assumed different tab
widths, so that no matter how you configured your editor some parts of
it would still look wrong.
'Wrong' how? Whatever the tab width, things indented with the same number
of tabs will line up, and that's what matters. Sometimes that indentation
might be more, sometimes less. How does that matter?
Mixing tabs and spaces will wreck you, of course, but everybody knows not
to do that.
Eclipse insists on indenting Java code anyway (and on breaking lines
in weird places, but that's another story)
We add a 0 to the end of the default line lengths, so it effectively never
breaks lines. We have wide monitors, and if a line needs breaking, a
programmer will break it.
so using tabs doesn't really offer any convenience.
Vive la chimie, en particulier, et la connaissance en general. --