3 ms·
I tend to agree, but aren't most of the new hot languages whitespace sensitive? Are there formatters for those kinds of languages?
by tombert 9y ago
I tend to agree, but aren't most of the new hot languages whitespace sensitive? Are there formatters for those kinds of languages?
- IshKebab 9y agoNo, 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.
- tombert 9y agoHaskell 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.
- jelder 9y agoOk, 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?
- tombert 9y agoThere 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.