[Mono-list] PInvoke Conventions

Thomas F. Burdick tfb@OCF.Berkeley.EDU
Fri, 27 Jul 2001 11:12:38 -0700

Andrew Sutton writes:
 > > The script could then based on this information spit out all the
 > > information we need.  It would take care of structures, and would also
 > > take care of mapping UNIX constants to C# constants.
 > if you take that route, you lose the ability to map run-time additions to 
 > constant sets. for example, if in winsock2 if you add a couple providers, 
 > remove a provider, and add back some of the ones that you removed, you're not 
 > gauranteed to get the same AF for each provider. at least, thats the way i 
 > think it works.
 > anyway, i don't think this is a very common scenario, but having a static 
 > compile time configuration limits your abilities to do stuff like that.

I think this is important because .NET isn't all that friendly to
dynamic languages right now, but MS plans to take more input from
dynamic language implementors (or so I've heard).  I admit to not
having followed this thread, so excuse me if I'm bringing up ideas
already covered, but have you looked at CMU Common Lisp's alien
system?  The alien section starts on page 115 of the users' manual
<http://www.ocf.berkeley.edu/~tfb/cmu-user.ps.gz> (I've stuck a copy
here because the machines at cons.org are being moved).  Is there a
reason we can't do something like this?