in reply to Re: On the rejected additions to List::Util
in thread On the rejected additions to List::Util
The module author determinate what belongs to the API.
Normally, yes. Does that still apply to core modules like List::Util? I'd always assumed that authors gave up a certain measure of control in exchange for having their module distributed as a fundamental part of the Perl standard library.
As you pointed out all rejected functions are already in List::MoreUtils. I'm strictly against duplicating every function in all modules.
The question is more why List::MoreUtils has to exist at all. Why not put the functions in List::Util and do away with List::MoreUtils completely? Isn't it simpler and cleaner to have one utility module instead of several?
The other issue is that List::MoreUtils is not a core module. That means there is no guarantee it will always be available. This is a big problem for many people. We don't all have root on the machines our code runs on. We might not even have access to those machines, in which case we are unlikely to have the clout to insist that third-party modules are installed on them. If functionality is not in the core libraries, we might be forced to reinvent these wheels again and again and again. How is that good?
I like clean simple API's much more than a collection of oneliners.
Do you think it's cleaner to have all the oneliners copied and pasted into the start of every script that uses them? Do you think it's simpler to have to remember which of several list utility libraries each basic function is in?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: On the rejected additions to List::Util
by mr_mischief (Monsignor) on Apr 28, 2009 at 21:18 UTC | |
by ysth (Canon) on Apr 29, 2009 at 06:32 UTC | |
by lodin (Hermit) on Apr 29, 2009 at 11:29 UTC | |
by mr_mischief (Monsignor) on Apr 29, 2009 at 13:24 UTC | |
by parv (Parson) on Apr 29, 2009 at 14:44 UTC | |
Re^3: On the rejected additions to List::Util
by ysth (Canon) on Apr 29, 2009 at 05:08 UTC | |
Re^3: On the rejected additions to List::Util
by borisz (Canon) on Apr 29, 2009 at 16:14 UTC |