Hacker News new | past | comments | ask | show | jobs | submit login

All significant characters should be non-empty/visible, I think that sums up why I prefer braces.



It'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.


Nearly 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?


> Nearly every editor has a "show whitespace" option. Except VIM

Sure it does. See 'list' and 'listchars'.


Which looks ugly as hell per default and I have never gotten to work quite right for me


I 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.


Only monsters prefer invisible characters having syntactic meaning, and most of them probably also like pineapple on pizza. Shameful. (j/k)


I agree entirely with the above, not kidding.


<- Whitespace isn't invisible.


If you can’t see whether a line is indented, you need to visit an eye doctor urgently.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: