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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
What....are.....you.....doing?! (Score:2)
Re:What....are.....you.....doing?! (Score:4, Interesting)
What I'm accomplishing is grouping things together that logically belong together. Plenty of times I've seen cut-n-drool programmers slap some code in the middle of a chunk that shouldn't be split up only to break things and scratch their heads trying to figure out why. This makes it tougher to do that.
No offense, but I don't buy the "confusion down the road" argument. Why is this confusing? Because it's new? No one has a problem chaining accessors and they do it every day in Java. The first time I
Re:What....are.....you.....doing?! (Score:1)
Also, sometimes it makes sense for mutators to return something. For example, returning the previous value can be useful. Or if the mutator constructs an internal object, then returning that object might make sense. In Perl, the lack of exceptions frequently means returning error indicator
Re:What....are.....you.....doing?! (Score:1)
Surely that's a good thing! When you make it easy for the implementor at the expense of the user, you end up with something like Ant [apache.org] where you have to write XML. I'd much rather use Module::Build or even ExtUtils::MakeMaker — for all their faults (and the former has many fewer faults than the latter), they're easier to use than either writing my own Makefile or writing an XML file.
Reply to This
Parent