Hacker News new | ask | show | jobs
by octoberfranklin 167 days ago
Looks fine to me.

I'm going to guess that you're used to codebases that use an autoformatter.

There's definitely a case to be made for autoformatters in projects with a very large (>100) number of developers, but the price you pay for that is much poorer information density per screenful of code.

For things like tinygrad or sqlite with a small dev team it's possible to use whitespace, style, and formatting to communicate important information, just like mathematicians do. The AMS journals don't autoformat mathematicians' equations!

2 comments

Even with autoformatters, it's a choice of what criteria you pick. It's possible to have consistency without enforcing low information density.
No, it really isn't. Like I said, math journals don't autoformat the mathematicians' equations. There's signal encoded in the formatting that a tool can't understand.

But if you have hundreds of developers on a project it does in fact make sense to sacrifice that signal in order to keep them from fighting with each other over silly formatting choices.

I wish. Stuff like Prettier is purposely unconfigurable and leads to the unreadability of JS code across the ecosystem.
> I'm going to guess that you're used to codebases that use an autoformatter.

I'm used to Python code being "Pythonic" - which is one of those "I know it when I see it" terms.