DEV Community

Discussion on: Is This Snowflake Code?

Collapse
 
jacoby profile image
Dave Jacoby • Edited

I see the braces going with the indented code, not the surrounding code. So, I would do this:

    {
    my $code = code_goes_here() ;
    }

over

{
    my $code = code_goes_here() ;
}

I started doing the ; thing so that, if I was copy-and-pasting a variable, I wouldn't also get the semicolon, but that's a carry-over from highlighting in a terminal window and paste-or-middle-button. It was the 1990s, and I don't think editors behave like that anymore.