News for hackers. Stuff that matters.
Re:Fundamentals of Optimal Code Style by Y_Y on Thursday March 25, 2021 @07:40PM (#26587069)
Maybe I'm just a sub-optimal code monkey, but a lot of what TFA advocates for seems bananas. Most egregious was separating function names from the opening bracket for their arguments.

I don't want to start a fight about that, but I do want to draw attention to the paradox that the "optimal" readability is so jarring to read.

Re:Fundamentals of Optimal Code Style by kbenson on Friday March 26, 2021 @12:40AM (#26588810)
Yeah, it's interesting that they present two choices, but not my preferred choice, thus leaving me to wonder why their options are supposedly superior. E.g. out of

    result = someFunction(firstArgument, secondArgument);
    result = someFunction (firstArgument, secondArgument);
They view the second as easier to distinguish the function from the arguments. I agree. But then again, I generally might write that like so:

    result = someFunction( firstArgument, secondArgument );
Which I think accomplishes the same purpose, and as a style has the added benefit of making KV pairs more distinct if you group them:

    result = someFunction( argX="foo", argY="bar" );