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

I've been using prettier.js in my JS projects for a few months and honestly I can't imagine going back to formatting my own code. It would be like making all of my own clothes or something. Who has time for that?

The Go community was on to something with gofmt (even if they did decide on tabs).



I tend to agree, but aren't most of the new hot languages whitespace sensitive? Are there formatters for those kinds of languages?


No, whitespace-sensitive languages are still generally the exception (except newlines). In fact I can't think of a new language that is vaguely popular and whitespace sensitive since Python. I guess there is YAML but that isn't a programming language and is also a bit mental.


Haskell is (slowly)growing in popularity, and F# is whitespace sensitive, and these are (for better or worse), the only languages I touch nowadays.

I suppose that maybe none of the really popular languages follow this though...my bad.


Ok, here's a question I've been wanting to ask someone steeped in syntactic-whitespace languages. Do you find that two developers typing the same code will format it the same way? How much would an auto-formatter change in your team's code?


There has been a bit of friction on that very point...Now we just agree on "four spaces all over the place".

I know for a fact that an auto-formatter like `gofmt` or something would have avoided at least one argument, so it would probably would make the code better in some respects.

That said, I like the whitespace. I like that it forces you to think about how the code is formatted and it tends to make the code a lot less verbose.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: