I laugh when I see those 50-page English-language documents describing how some institution wants code to be formatted. Ain't nobody got time for that.
I laugh when I see those 50-page English-language documents describing how some institution wants code to be formatted. Ain't nobody got time for that.
What situations have you found where automated formatting doesn’t suffice or has these limits?
Some tools order/deduplicate imports. Prettier does not. [1]
And no tool that I've seen orders fields/constructor/method, etc.
But in any cases, all formatters allow you to selectively disable it for certain liners.
It would be, but as you can see in the linked issue, it was closed for being a non-goal. So, it's not likely to change.
(Prettier generally keeps the AST identical; i.e. whitespace and parentheses changes only.)
That said, I haven't seriously tried programming using variable width fonts; maybe it's a well-kept secret to digesting code. Or maybe it's like Hemp Milk, there's a reason it hasn't caught on.
PS: The idea is not mine but I can't remember where I read the instructions about this editor setup, so Google is your friend.
https://gist.githubusercontent.com/diegoperini/853d54c8873e7...
* to be fair, I’d have trouble with a bad proportional font like Times New Roman, but I’m sure many would have trouble with Courier New on the other side, the specific font matters.
And you can still manually format code, serif or monospace.
Proportional or monospace font choice is orthogonal to formatting.
(Edited to be more specific)
Mono space allows you to do manual alignment, eg if you want ascii art in your code or non standard formatting. Doing this with a proportional font means other people can’t read your code without using the same font.