qforeign-0.62

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Fri Dec 1 01:52:28 EST 2000


Fri, 01 Dec 2000 12:53:26 +1100, Manuel M. T. Chakravarty <chak at cse.unsw.edu.au> pisze:

> > The second way is paranoid: do the same but export the type abstractly.
> > This is as safe as your solution, but uses the same style of interface
> > as non-paranoid solutions, and allows exporting the representation through
> > a private module for those who really need it.
> 
> I don't really fully understand what you want to say here...

Forget it...

When somebody feels bad allowing calling his functions with bogus
or non-portable arguments, and wants to provide the type abstractly,
then he can do it in the "variable" scheme too.

The scheme can be extended to allow retrospective adding of new
constants by splitting the module into two, like Socket + SocketPrim,
and exporting the type non-abstractly only from the lower layer.
Thus we have both a nice abstract interface and a way to fiddle with
non-standard constants.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTÊPCZA
QRCZAK





More information about the FFI mailing list