News for hackers. Stuff that matters.
Re:The Montreal Problem: Why Programming Languages Need a St... by Retr0id on Friday March 15, 2024 @10:44AM (#39716326)
If style is not important, it seems like all the more reason to standardize it.
Re:The Montreal Problem: Why Programming Languages Need a St... by velcrovan on Friday March 15, 2024 @10:46AM (#39716345)
I am pro-standardize, but this isn't a great argument. Enforcing a standard style takes resources from both the language and the people using it. You don't spend resources on something that isn't important.
Re:The Montreal Problem: Why Programming Languages Need a St... by Retr0id on Friday March 15, 2024 @11:00AM (#39716533)
Coming up with and agreeing on a standard takes work, but in most cases unofficial standards already exist - one merely needs to be blessed. (And if some project wants to not use it, that's also free)
Re:The Montreal Problem: Why Programming Languages Need a St... by erikerikson on Friday March 15, 2024 @11:23AM (#39716777)
Yes, as you say because the style is not important. Consider the wasted time on arguments between tabs and spaces and how many spaces; the noise in PRs from style conversions that hide the actual additions and alterations; the increased efficiency that comes from learning and using the shapes of a codebase to more quickly seek.

It doesn't matter what the style convention is so long as you have one, you have automated tooling that creates and validates it, and that enforcement is done by machines as part of the delivery process.

Not because style is valuable but because time is a valuable resource and spending it on preference differences and dealing with variances is wasteful.

Re:The Montreal Problem: Why Programming Languages Need a St... by anon291 on Friday March 15, 2024 @10:56AM (#39716473)
Well... no. Engineers are more efficient in their own styles. Realistically, I've wasted hours setting up my editor at each new job / each project to get on board with the style. This really doesn't matter. Maybe it's just me, but I feel that a good engineer ought to be able to read code regardless of the indentation or particular language dialect (within reason).

When I've led teams, I've never enforced things like indentation or bracketing styles. Things I do enforce are (1) explain complicated code with comments, (2) make it readable (for whatever definition of readable), and (3) reasonable naming conventions (i.e., don't name every variable i, j, k). These guidelines are useless for automated tooling. Perhaps in the age of LLMs this will change (who knows).

I've found the strict requirements and automated tooling absolutely terrible. I often align things to keep parallel structure to show how different lines are the same or to create 'tables', etc. Formatting tools destroy this. For me, using my emacs rectangular editing, the alignment greatly increases productivity. This is one example. I'm much faster at editing personal projects / projects I've led than ones with strict style guidelines.

For me, I always tell my guys: edit in the style in which you are fastest and most efficient. I believe this greatly increases productivity rather than having a team 'nosy neighbor' that cares whether you use two or four spaces for indentation.

My two cents.

Re:The Montreal Problem: Why Programming Languages Need a St... by zeroxfe on Friday March 15, 2024 @11:29AM (#39716854)
Your approach seems like the worst of both worlds: a single codebase with mixed styles.

I work at a large tech company, and while I don't really participate in style wars, I do care that there is a single enforced standard across any particular codebase.

Re:The Montreal Problem: Why Programming Languages Need a St... by axelerator on Friday March 15, 2024 @11:40AM (#39716966)
> Well... no. Engineers are more efficient in their own styles. Realistically, I've wasted hours setting up my editor at each new job / each project to get on board with the style

I disagree for two reasons:

1. Optimizing for what each dev is used to is optimizing for a local maximum. If they’re THAT good it won’t take them long to adjust to new defaults. Good engineers should be able to pick up a new lang quickly so some changes in the context of a language should not bog them down significantly in the long term.

2. The overly long time it took to set up tooling in a particular company or language do not outweigh the bigger advantage of being able to quickly get a grasp about what a piece of completely unfamiliar code does.

Re:The Montreal Problem: Why Programming Languages Need a St... by pnathan on Friday March 15, 2024 @04:11PM (#39720169)
That is my take, after having written in many languages over many years.

I also think this is more of a Zeitgeist thing, to be honest.