Fair enough.
I'm willing to know about use cases for more than one space - and I'm completely sincere. The language is just born, we have time to adjust all these details.
People expect whitespace to be either 'indifferent' or 'significant'.
Indifferent is the default: it means you only need whitespace when tokens would otherwise parse wrong, like `symbol1234` vs. `symbol 1234`. Also, you can add as much as you want, the parser doesn't care.
Significant means that whitespace is semantic, meaningful. This almost always means depth of indentation, although I've encountered other semantic whitespaces in the wild.
Sometimes lining things up just looks nicer. Here's an example of how I like to construct a literal Lua table:
local colors = { black = 0x000000,
white = 0xffffff,
red = 0xff0000,
blue = 0x0000ff,
green = 0x00ff00, }
Lots of whitespace! Two spaces on either side of the longest equals, for the longest symbol, and left-alignment on the keys.
I don't like this nearly so much:
local colors = { black = 0x000000,
white = 0xffffff,
red = 0xff0000,
blue = 0x0000ff,
green = 0x00ff00, }
The hex values are all over the place, it makes it harder to read them and see the pattern. Consider a collection of binary flags as another example where you really want the right column to line up.
You could choose to right-align the left column, so that the equals are in the same place and the right column lines up, but why should you? Then you miss the semantic indentation. They're columns, I want to column align them.
I support no tabs, though :D we share religion on that one.
Wow... you picked up just the right example. I mean, hex values are just a perfect scenario - was that simple integer values I probably would disagree (I don't like the possibility of messing with diffs in the case some variable receives a big name, for instance).
Now I'm thinking about math, also. The assignment with "=" is not a thing on Tcl-like languages in general, but maybe some "formulas" would benefit from more spacing, like
set x 1 + 2 + 3
set y 1000 + 2000 + 3000
(or something like that. YMMV)
Okay. I'm changing that as soon as I can. Thank you very much.
Indifferent is the default: it means you only need whitespace when tokens would otherwise parse wrong, like `symbol1234` vs. `symbol 1234`. Also, you can add as much as you want, the parser doesn't care.
Significant means that whitespace is semantic, meaningful. This almost always means depth of indentation, although I've encountered other semantic whitespaces in the wild.
Sometimes lining things up just looks nicer. Here's an example of how I like to construct a literal Lua table:
Lots of whitespace! Two spaces on either side of the longest equals, for the longest symbol, and left-alignment on the keys.I don't like this nearly so much:
The hex values are all over the place, it makes it harder to read them and see the pattern. Consider a collection of binary flags as another example where you really want the right column to line up.You could choose to right-align the left column, so that the equals are in the same place and the right column lines up, but why should you? Then you miss the semantic indentation. They're columns, I want to column align them.
I support no tabs, though :D we share religion on that one.