river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Formatting of River Source Tree
Date Thu, 09 Dec 2010 13:04:08 GMT
I don't think anyone questions your ability to make it work well for
you. If it wasn't, then you and N% of the developers would continue
with it.

I think the strongest argument in favor of spaces are simply; More
people/projects fuck up with tabs. Tabs users are "annoyed" over space
usage, but Space users not only screw up their own experience, but for
everyone else as well on every commit.


On Thu, Dec 9, 2010 at 7:23 AM, Gregg Wonderly <gregg@wonderly.org> wrote:
> On 12/5/2010 12:26 PM, Patricia Shanahan wrote:
>> On 12/5/2010 10:09 AM, Gregg Wonderly wrote:
>>> I understand that many people have differing problems with just tabs.
>>> All of the printing, cating and screen dumping issues are most likely
>>> in an environment where you can use
>>> pr -te 4 ... | more
>> This does not really help with copy-paste into e-mail.
> I just open file in the vi editor and type "%s/^t/    /g" copy the text and
> paste it into the mail message.  I've just always done this kind of thing
> because it is so easy to do.
>>> Many other out if the IDE/editor issues can be solved with something
>>> similar.
>>> My main issue is, about in the editor/IDE. Iff there are just tabs,
>>> then anything that your IDE does with tab expansion does not hide
>>> indentation.
>>> Iff there are only spaces, then while you are viewing, you won't see
>>> anything odd. But when you start editing, then you have to have your
>>> tabs set to the same number of spaces as the source file. Of you
>>> expand tabs to spaces all us well. If you don't, then then next
>>> person to view the file with a different tab setting will have a
>>> nightmare.
>>> Sure, you have to do tabs only or spaces only everywhere for anything
>>> to work. With tabs you lose the problem in the editor of needing the
>>> same expansion factor.
>> Don't you need matching set-up either way? Tab-only with the indentation
>> to 4
>> spaces, and the tabs to 2 would be just as bad as space only with the
>> wrong
>> number of spaces.
> No, I never put "text" that is not code after tabs.  In comments I put
> spaces and I usually never (but have on occasion) create complex layouts of
> trailing aligned text to the right of code without using spaces instead of
> tabs.
>> The good news about spaces is that the code will display with reasonable
>> indentation in *all* environments, including e.g. quotes in e-mail,
>> regardless
>> of the choice of e-mail client.
> Okay, display is fine with tabs, but I am talking specifically about code
> that everyone has to edit (open source multiple commiters).  When I worked
> at AT&T, module owners did not always "edit" code in their modules, they
> were the approval gate.  The use of tabs only made it possible for everyone
> to use different tab settings.  We had people with different screen
> resolutions, different width textual screens, different computers/terminals
> etc.  People needed to be able to adjust tab expansion of code on a wim so
> that they could look at complex indentations of very deep in-lined code.
>  I'd regularly type ":set ts=2 sw=2" in vi to look at stuff that needed to
> be looked at this way.
> With just spaces, you can never do that sort of thing in most editors
> trivially.  In VI, you can of course do ":set ts=X sw=X" to whatever the
> expansion was in spaces then type 1G>G followed by 1G<G followed by ":set
> ts=4 sw=4" to see the code in 4 character tabs.
> Somehow I'm sure that most of you have completely different experiences and
> really value your spaces.  I'll stop going on about this, but I just wanted
> to stress that I have spent a lot of time using just tabs (25+ years) and
> I've always wondered why people are so convinced about just spaces.  I've
> heard a lot of explanations, but most of them are about printing, viewing
> and "catting".
> I've always used the VI editor for the same 25+ years and it has such easy
> control and expansion of spaces vs tabs, that I just always deal with
> whatever I come up against.  In mixed tabs and spaces, I do "1G!Gp4 -te 8 %
> | more" and then the above ":set ts=8 sw=8", !G>G, 1G<G to switch to leading
> tabs, and then ":set ts=4 sw=4" to switch to 4 character tabs, which I
> usually use.
> I can get by in VI.  But in an IDE it gets much harder to switch between
> tabs and spaces.  Just tabs means I can't edit code and type tab without
> changing how they expand and what interval they expand to.  This is an IDE
> wide setting.
> So then when I am messing with my own code and "spaced" code, I have to jump
> through all kinds of hoops in the end to not end up with a mismash of
> tabbing.
> Okay, enough said.
> Gregg Wonderly

Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug

View raw message