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.
namespaces (Score:1)
GPA, but here goes:
Though inheritance is usually needless complexity, and functional programming
with ADTs is the One True Way, using packages in Perl *is* still very
convenient. It lets you push the functions on your ADT into the namespace of
that package, instead of having one huge function namespace. So instead of
oparate_on_foo($foo) and operate_on_bar($bar), we can just say
$foo->operate() and $bar->operate(). This ends up making your code more
terse, making the logic more obvious.
Reply to This