Aaron Sherman wrote:
TSa wrote: > Miroslav Silovic wrote: >> package Foo does FooMultiPrototypes { >> ... >> } > > I like this idea because it makes roles the central bearer of type > information.Type information is secondary to the proposal, but I'll run with what you said. This (the example, above) is a promise made by a class to meet its own specification.
Actually, it's a promise made by a package (not a class) to meet the specification given by a role (which can, and in this case probably does, reside in a separate file - quite likely one heavily laced with POD). Specifically, the role states which subroutines the package must define, including the signatures that they have to be able to support. IOW, it defines what the package is required to do, as opposed to what the package is forbidden from doing (as your proposal does). If I'm understanding the idea correctly, you write the package role as a file, hand it to the programmer, and tell him to produce a package that does the role. -- Jonathan "Dataweaver" Lang
