2007/1/12, felix winkelmann <[EMAIL PROTECTED]>:
On 1/11/07, minh thu <[EMAIL PROTECTED]> wrote:
> >
> > Could you elaborate on this? Do you want to let the user specify the
> > actual record type, or it's contents?
> The record type.
> Say mailbox use a list-based queue implementation (so 'mailbox' in the
> following sentences is a hypothetical one).
> Could I provide another implementation of a queue to be used by mailbox?
> Or could the author of mailbox make it possible by providing different
> implementations ?
> I don't know module systems but maybe my question is wheter we can
> parametrize a module when loading (instanciating ?) it.
>

Well, this is what is called "functors" in SML, for example: parameterized
modules. You provide a module implementing the operations on
a specific datatype and pass this module to your mailbox module.
A (very basic) implementation of such functors is in the "lexmod" egg:

http://chicken.wiki.br/lexmod


cheers,
felix


Thank you. For the thread/print issue, I will retry and maybe post the
offending code (after cleaning it of irrevlevent things).
thu


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to