[Bro-Dev] whitespace convention (tab vs. space)
gregor at icir.org
Thu Mar 17 15:25:25 PDT 2011
On 3/17/11 10:17 , Robin Sommer wrote:
> On Thu, Mar 17, 2011 at 10:10 -0700, you wrote:
>> There's always expand/unexpand.
> Without having used them, I think going from spaces to tabs
> automatically is tricky, isn't it? Or said differently: just by doing
> the conversion, one doesn't necessarily get the layout "right".
Yeah. That's usually the problem. Since space<-->tab conversion depends
on the tab-width that should be used. So I would not recommend do
convert automatically it.
But it might be nice to just have a checker, that can notify one if the
indentation style in a file is "wrong". Then one can manually check and
decide whether expand/unexpand is warranted.
(Note that for code that uses tabs, mixing spaces and tabs makes sense
in one particular case: continuations:
<TAB><TAB> this_is_a_function (it, has, very_very_very_many,
<TAB><TAB><SP><SP>...<SP> arguments, more_args, foo, bar);
just my 2ct
BTW: I prefer tabs (but python more or less forces one to use spaces....)
<gregor at icir.org> <gregor at icsi.berkeley.edu>
Int. Computer Science Institute (ICSI)
1947 Center St., Ste. 600
Berkeley, CA 94704, USA
More information about the bro-dev