re: Is This Snowflake Code? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hello Dave, As a personal taste, i do find the second style braces to be harder to read than the first one, just like the others before me have st...
 

Re: Your first paragraph

Similarly, when I'm dealing with other people's code, or maintaining things that are not exclusively mine, I am happy to work to that style. (Within parameters; I am refactoring a 2.5 KLOC program that not even the original developer felt comfortable fixing, and I am not respecting it's established style one bit.)

My problem is that the opening brace is not at the same line.

sub sample_subroutine {
    ...
}

Wouldn't it be more like?

sub sample_subroutine {
    ...
                      }

???

Unless you go full GNU-style...

sub sample_subroutine 
{
    ...
}

Which makes it seem to me like sample_subroutine dropped the opening brace like Sonny dropped the gun in the restaurant scene in The Godfather.

My formatting is consistent, because of perltidy. I have a keystroke aliased in vim, and use the VS Code to allow Perl formatting (although I am convinced it is not using the installed perltidy executable, even though I have told it the path.)

My first degree is in Journalism, and many evenings doing full-page layout has given me a sensitivity to readability, but I don't want one person's view of readability forced upon me, especially when it can hide productivity bombs.

(First time I touched Python, in 2000 or so, it was indented with tabs, and someone -- maybe me, maybe the source, maybe a solar flare while in transit -- put a space before a tab, making the code non-functional and making my hello world experience a couple hours of frantic debugging. I know this would not happen with Python 2.7 or 3.5, but it made me hate Python for 20 years. Now, I mostly hate Python packaging and how it routinely breaks my toys, but that's another matter.)

On the subject of Force and One True Style, I was recently made aware that Go will reformat your code on compile, leading to swag that says GO FMT yourself.

I ... um ... yeah.

But thanks for the time you spent reading and responding. While I may not agree with your points, they are well-considered and well-expressed.

code of conduct - report abuse