On Thu, Feb 01, 2001 at 10:14:20AM -0500, Dan Sugalski wrote:
> Since everyone's spinning aimlessly around, I'll throw out something for 
> everyone to think about, and perhaps we can get a PDD out of it.
> 
> One of the features of perl 6 is going to be the ability to automatically 
> use a module if one or more preregistered functions are used in your 
> source. So, for example, if we pull out the socket routines into a separate 
> module but your code uses one of the socket routines, we automagically use 
> the socket module. The fact that it's separate is completely invisible to 
> your program. The module loaded can define the routines as either regular 
> perl subs or opcode functions (the difference is in calling convention 
> mainly) and could be the standard mix of perl or compiled code.
> 
> Would someone care to take a shot at formalizing the system? We need a way 
> to register these functions, track the module version (if any) they're in, 
> and stuff like that. (Including, I'm sure, things I've forgotten)

Don't forget that it should tie in with the concept of defining
'interfaces' so

        use Foo qw(bar);

may actually just load an interface definition and that definition
can be (lazily) bound to one of several alternative implementations
of the Foo interface (one SX and one pure-perl, for example).

Basically I'm saying that transparent autoloading should be an
attribute of the interface definition.

Tim.

Reply via email to