News for hackers. Stuff that matters.
Re:Programming Style Evolution in Perl by jrockway on Monday January 11, 2010 @07:19PM (#1046417)
The Moose version just complicates it beyond necessity. That's true of plenty of real-world programs, too.

Learn what object-oriented programming is, then come back and tell us what you think.

Re:Programming Style Evolution in Perl by chromatic on Monday January 11, 2010 @07:45PM (#1046488)
For the example given? Nonsense.

It's very difficult to choose good examples for programming tutorials. In this case, the example was too small and self-contained to support modern Perl practices intended to help manage programs of hundreds of lines or more.

Re:Programming Style Evolution in Perl by jrockway on Monday January 11, 2010 @08:21PM (#1046550)
Dunno, I use Moose for my small scripts and find them to be significantly more maintainable than they would be if they were a bunch of code in a file. Hence MooseX::Runnable.

"Procedural programming" is a generally meaningless term (even less meaningful than "object-oriented programming"), but I find opportunities for abstraction even in small programs. The procedural makes it difficult to exploit these opportunities.

Re:Programming Style Evolution in Perl by ajross on Tuesday January 12, 2010 @11:06AM (#1047753)
Again, that's kind of a straw man. All scripts are "just a bunch of code in a file". You're equating your organization using Moose to the inability to organize code without it, which is silly.

You're also equating "abstration" with "good", which it isn't. You abstract for practical reasons, not for its own sake.

Re:Programming Style Evolution in Perl by jrockway on Tuesday January 12, 2010 @02:35PM (#1048281)
The abstraction makes it easy to reuse parts of your "one-off" scripts. For example, look at the number of CPAN modules/programs that implement some sort "restart when file is changed" functionality. There are a lot.

If you use MooseX::Runnable, though, you write an introspectable class instead of a script. Now a plugin can handle adding this functionality to your script in a structured way, and all you, the developer, have to do is say "mx-run +Restart::Auto My::Class" instead of implementing that functionality manually in your script.

Reuse is always good. Not writing code is even better.

Re:Programming Style Evolution in Perl by ajross on Tuesday January 12, 2010 @11:07AM (#1047758)
But... the example was all there was. This wasn't an article with a core point that simply picked a bad example. There's almost no text. If the code exhibited isn't good enough to make the point, then what point is there to be made?
Re:Programming Style Evolution in Perl by chromatic on Tuesday January 12, 2010 @01:53PM (#1048187)
I understood the point only because I have practical experience working with large amounts of Perl 5 code in every stage of the mentioned enlightenment. The example worked for me; it won't work for people without that experience.