Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know of any text editors that don't render variable width tabs based on the tabstop position. In programming environments we usually only use tabs at the beginning of the line for indentation, it's a bit more rare to use them for alignment due to inconsistent tabstop settings.

There's also Elastic Tabstops if you want to go all in on using tabs for alignment: https://nick-gravgaard.com/elastic-tabstops/



I maintain, that if everybody used a sufficiently smart editor, tabs for indentation and spaces for alignment would be the objectively correct choice.


If everybody used a sufficiently smart editor, and used sufficiently smart codegen, and we removed all the existing breakage from our tools and infrastructure, yes. I wish I lived in that world.

TBH my money is on that never happening, but maybe we will skip to an even higher level, where the canonical format for source code is the AST rather than plain text - indentation, braces, line length, all the things that humans care about but the computer doesn’t become render settings.


It’s happened more than once. Itemis built a whole pile of tools on it, and the things it enables (stacked DSLs lowering to C, for example).

Sadly, nobody wanted it. Check out https://mbeddr.com and weep for what could have been.


As long as we agree that the line length limit will be based on tab=8... are there smart editors that can check that?


I consider line wrapping to also be part of a sufficiently smart editor, and line limits should also go away in an ideal world.

The limiting factor on line length should be "is this too complex for your coworkers to understand"


A sufficiently smart editor can figure out everything by itself and doesn't need preformatted text.




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

Search: