in reply to Re: Beware of global! And bless the local!
in thread Beware of global! And bless the local!
Hello, kcott!
I should adopt anonymous blocks as a every-day programming technique, thank you. As with the simple but powerful Truth of local, it's also always under my nose, and still I'm not using it - but I will!
As for unnecessary things like "= undef" and "close $fh" - I like it this way, it's more informative and illustrative this way. It takes more chars to write, but less mind time-clocks to comprehend the meaning. I like to write explicit "return $string;" instead of laconic "$string" in the end of the sub. I think that a programming language should stay language that we speak and understand, and I don't want to short-cut to the point in expense of explanation. In the end I'm speaking this language with myself-in-the-future, and it's for me I write those many words that could be omitted.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Beware of global! And bless the local!
by stevieb (Canon) on Dec 12, 2019 at 15:58 UTC | |
by Your Mother (Archbishop) on Dec 12, 2019 at 17:10 UTC | |
by stevieb (Canon) on Dec 12, 2019 at 17:37 UTC | |
by Fletch (Bishop) on Dec 12, 2019 at 17:59 UTC | |
|
Re^3: Beware of global! And bless the local!
by kcott (Archbishop) on Dec 13, 2019 at 05:01 UTC |