Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Oh come now. Readonly may be sub-optimal for some cases, but does it really rise to the level of "evil"?

    Readonly works at run-time. That's a feature. While there are many places where it would be better if it worked at compile-time, it (currently) doesn't have that capability.

    The compiler cannot take advantage of Readonly variables' immutability, as you point out -- but does that really make all use of the Readonly module evil? Tone down the rhetoric a notch, please.

    • When used for package-level scalars Readonly has only one real advantage. It interpolates.

      In exchange for interpolation, your code is larger, slower and adds a non-core dependency.

      It's exactly this sort of module that we've seem time and time again, it adds a small convenience for a disproportional expense. People are lured into making their code worse for shiny beads.

      Overuse of version.pm, inside-out objects, bundled non-optional coverage tests, the list goes on and on. People are encouraged to use something which will hurt them much more later, for a small benefit today.