Graham Barr wrote:
>
> On Wed, Aug 16, 2000 at 04:49:15PM -0500, David L. Nicol wrote:
> >
> >
> > or AUTOLOAD can be defined in terms of C<catch>
> > and overloaded that way, rather than being its own
> > kind of magic.
> >
> > catch "AUTOLOAD-$classname-$polymorphicsignature" {...
>
> But why should I have to know that a sub I want to call has to
> be AUTOLOADed ? That is an implementation detail of a module
> that I as a user should not need to know
>
> Graham.
You don't. The people who implement the modules are users too.
Even Dan Sugalski is a user. If mechanisms can be combined,
that makes life simpler everywhere in the long term. As long
as we don't sacrifice flexibility for combination.
How to offer more flexibility in AUTOLOAD, simpler, is another
thread somewhere in here -- on -language I think, if not on
-OO because there is no -OO.
What I was suggesting was, if you want to overload the autoloading
of something, it could be done with "catch" instead of rewriting
the ::OVERLOAD procedure, for that module.
"method not loaded" becomes an exception which is thrown, rather
than "AUTOLOADING" being its completely separate deal. OO allows
the combining og procedures that have things in common. AUTOLOAD
of a METHOD-NOT-FOUND is an excellent example of a genuine case
of an exception (no method!) and a handler (autoload mechanism.)
It makes these file-not-found things look like contrived crap they are.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Useless use of a void in constant context