3 ms·
All significant characters should be non-empty/visible, I think that sums up why I prefer braces.
by lionkor 2y ago
All significant characters should be non-empty/visible, I think that sums up why I prefer braces.
- Culonavirus 2y agoOnly monsters prefer invisible characters having syntactic meaning, and most of them probably also like pineapple on pizza. Shameful. (j/k)
- dajtxx 2y agoI agree entirely with the above, not kidding.
- TheOtherHobbes 2y ago<- Whitespace isn't invisible.
- makeitdouble 2y agoIt's weird to me to as a programmer to categorize space/tabs and new lines as empty or invisible. It only makes sense if you're writing by hand on paper or designing a page, sure wherever you don't write is empty. But even then that's still visible space. Then most language we currently use still rely on spaces in critical ways. `public function a()` and `publicfunctiona()`are not equivalent and there's no replacement character for the spaces. Now, more power to you to like braces, same way some languages like dollar signs.
- cardanome 2y agoNearly every editor has a "show whitespace" option.[0] I still don't understand why some people don't use it. Even in non-whitespace sensitive languages, I need to see the whitespace so that I can tell if the formatting is off or not. Also make the code easier to read as I can literally see how far the code is intended instead of having to guess by amount of space. Sure, automatic code formatting solves most of the issues but it is still good to have actual control over your whitespace. [0] Except VIM which vexes me greatly. Might be one of the reasons whitespace sensitive languages are disliked by certain programmers?
- chrismorgan 2y ago> Nearly every editor has a "show whitespace" option. Except VIM Sure it does. See 'list' and 'listchars'.
- cardanome 2y agoWhich looks ugly as hell per default and I have never gotten to work quite right for me
- PhilipRoman 2y agoI use something like this for my daily work vimrc: set list listchars=tab:›\ ,multispace:· The only thing I hate about vim's treatment of indents is having separate settings for shiftwidth and tabsize.
- xigoi 2y agoIf you can’t see whether a line is indented, you need to visit an eye doctor urgently.