On Wed, Nov 12, 2003 at 09:42:05PM +0000, Nicholas Clark wrote: > On Wed, Nov 12, 2003 at 10:16:51PM +0100, Paul Johnson wrote: > > On Wed, Nov 12, 2003 at 01:32:13PM +0000, Simon Cozens wrote: > > > > > Hi. I'm about to write a module which presents an array in sorted order; > > > $a[0] will always be the "least" element by some comparator. Miraculously, > > > there doesn't seem to be such a beast on CPAN already. > > > > > > Is Tie::Array::Sorted a reasonable name for it, or would another one be more > > > obvious? > > > s/Tie::// ? > > > > Do I need to be concerned with how the module is implemented? > > Presumably the documentation will tell me how to use it. > > > > Yes, this probably applies to the rest of the Tie:: namespace too. > > Oh, I was going to say this. > > Tie::Array::Sorted is a good name because it is consistent with many > other modules. > > But I consider them all to be misnamed. The implementation is not the > most important feature of these modules - why is it the most important > part of their names?
I disagree. The Tie:: doesn't just describe the implementation, it describes the interface. And that's often a key aspect of modules that offer functionality behind a tie interface. Given a choice between Array::Sorted and Tie::Array::Sorted I'd know that Tie::Array::Sorted provides a tie interface and so will, for example, let me pass a ref to the array to code I don't control and still get the behaviour I want. Tim.