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

Once someone uses a flexible feature, everyone else who works on the codebase has to deal with it too. Anyone who thinks of code as more of an implementation detail than a goal probably won't like not being able to just click auto format and forget it.


So what? It's not like pythonic whitespace prevents similar manual alignment incompatible with autoformat like

    if   x=1...
      if y=2

So you still have to resolve the coding style conflict somehow


You can resolve it by choosing a standard style for the whole project and letting auto format do the rest.

Maybe even auto rejecting commits that don't match it, like some projects do.

You could of course do the same with a flexible language, but without manual formatting at least some part there's probably not going to be as much benefit.

I guess you could say "auto format leaves braces alone" but then you don't have a fully machine executable style.

Maybe you could have the auto format just always compact the braces, but that seems like encouraging dense one liners, most projects probably want to discourage that.


You can't resolve it because it's manual formatting that's not part of the auto format rules, that's the point! And this doesn't depend on braces vs whitespace, manual improvements are possible in either case, so your argument against {} vs space flexibility doesn't have the benefit of forcing machine executable style




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

Search: