3 ms·
> one is a question of visual representation that should be represented by a unit that a user can define (tab), where does this assumption come from ? > In y
by jcelerier 5y ago
> one is a question of visual representation that should be represented by a unit that a user can define (tab),
where does this assumption come from ?
> In your example, with whitespaces, it's basically arbitrary - here it's 12spaces, next function where you multiline the arguments, it's `connect_more_14_chars(` so it will be 26 whitespace chars...
in practice it'll just be one key press as tools do the alignment. why would the number of whitespace chars matter at all ? what matters is that things are aligned.
- hnedeotes 5y ago> where does this assumption come from ? From the fact that with exception of languages with significant whitespace/tab it's a matter of visual representation: void foo() { connect(this, action, that, callback); } Perhaps I would prefer that my editor in this language, did this formatting. It doesn't change the meaning of the program. > in practice it'll just be one key press as tools do the alignment. why would the number of whitespace chars matter at all ? what matters is that things are aligned. This would be the same with tabs. But we go back to the same presentational aspect. If you prefer that it indents on the open parenthesis, and I that it indents on parent line start + 2 "visual" spaces we can't make an editor that covers both our preferences. With tabs, at least theoretically, we can, since the tab has no other meaning than an "indentation level" (which then translates into whatever it means "whitespace wise" for a given situation).