dfmt 0.1.0
FG via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sat Mar 7 03:28:48 PST 2015
On 2015-03-07 at 07:51, Russel Winder via Digitalmars-d-announce wrote:
> Many C++ > projects are returning to it, Go enforces it if you let it,
> many Python projects are starting to use it in spite of PEP-8.
Now, that you mentioned Python, it was one of the main reasons why I moved away from tabs. I was used to tab-completion in the shell and Python's interactive interpreter (and didn't want to rebind that feature to some key combination on every system that I worked with). Whenever I copied chunks of tab-indented source code into the interpreter, it got screwed up, because the indentations had vanished, so eventually I switched to using spaces only and had no problems ever since.
>> I can also say from experience that removing tabs from Phobos source has removed
>> a lot of irritation with messed up code rendering and wasted effort arguing
>> about it. We're not going back :-)
>
> And I am not going to work on Phobos for exactly the same reasons. My
> loss, not yours.
You must be joking. :)
If at all, the problem with Phobos' style isn't with horizontal spacing but vertical space.
Consider the waste of space below. Too much scrolling and I lose focus. Now, *that* is really irritating. ;)
struct Boo
{
int a;
}
struct Foo
{
int a;
auto opAssign(Foo foo)
{
assert(0);
}
auto opEquals(Foo foo)
{
return a == foo.a;
}
}
X calculate(Range)(Range r)
{
static if (something)
{
import whatever;
auto result = xxx();
size_t i;
foreach (e; r)
{
doSomething(result[i], e);
++i;
}
return result;
}
else
{
auto a = blah();
foreach (e; r)
{
a.put(e);
}
return a.data;
}
}
More information about the Digitalmars-d-announce
mailing list