in reply to Re^2: Align given substring(s) in lines
in thread Align given substring(s) in lines
That goes completely against my experience (15+ years with Perl). The only "boilerplate" required by strict is to declare variables which typically consists of three extra characters - that is not onerous.
Best practice is to only declare variables in the scope they are used and to initialize them when they are declared. In your sample code that amounts to 28 extra characters counting the "use strict;" statements. That is about a 2% overhead. 2% does not equate to "much faster" in my book.
"running prototype" != "working prototype". A simple typo in a variable name that strict would have alerted you to can easily soak up tens of minutes of debugging time or introduce subtle calculation or logic errors that may go unnoticed. Just one case like that detected by strictures will more than outweigh the trivial overhead of the "boilerplate" over tens of projects.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Align given substring(s) in lines
by johnaj (Sexton) on Apr 29, 2021 at 10:13 UTC | |
by haukex (Archbishop) on Apr 29, 2021 at 13:23 UTC | |
by johnaj (Sexton) on Apr 29, 2021 at 13:48 UTC | |
by haukex (Archbishop) on Apr 29, 2021 at 14:10 UTC | |
by johnaj (Sexton) on Apr 29, 2021 at 15:03 UTC |