News for hackers. Stuff that matters.
Re:Fundamentals of Optimal Code Style by spaetzleesser on Thursday March 25, 2021 @06:50PM (#26586623)
I have been coding for a long time and I believe more and more that you can put as much science in as you want. But in the end these things are highly subjective. Some people like it one way, some the other way. And in the end you can get used to almost anything once you have been doing it for a while.

I wouldn't mind if languages left no freedom for formatting and enforced a style. People would get used to it and a lot of ultimately fruitless discussions wouldn't happen.

Re:Fundamentals of Optimal Code Style by gherkinnn on Thursday March 25, 2021 @08:04PM (#26587295)
> And in the end you can get used to almost anything once you have been doing it for a while.

No. I never got used of line lengths above 80 chars. It hurts.

Re:Fundamentals of Optimal Code Style by qayxc on Thursday March 25, 2021 @07:52PM (#26587177)
> I wouldn't mind if languages left no freedom for formatting and enforced a style. People would get used to it and a lot of ultimately fruitless discussions wouldn't happen.

That's exactly what enforced style guidelines are for. Most big software companies do exactly that. They define a set of rules and those are enforced using tooling (i.e. you cannot check-in and/or successfully build code that doesn't adhere to the guidelines).

It's a pain sometimes (especially if line-length restrictions are enforced), but it frees your mind and that of the entire team from the fruitless discussions you mentioned.

Re:Fundamentals of Optimal Code Style by TameAntelope on Thursday March 25, 2021 @08:11PM (#26587342)
It's less about "one true way" and more about "pick a way and stick with it".

Almost none of this matters until it's not consistent, then it makes everything harder.