[Openmcl-devel] sockets and compatibility

Hamilton Link helink at sandia.gov
Mon Jul 1 09:36:12 PDT 2002


Depending on who's writing the code, this wouldn't save you from
conditionals -- I'd be surprised if not many people want their code to
run under both MCL and OpenMCL. Plus having the same package name may
end up implying more identical functionality than is actually the case;
recall good design is that the more identical two things look the more
identically they should behave. I'd hate to have unported code load,
only to break at run time due to subtle functional differences.

IMHO a better bet is to conditionalize the package declaration of the
code you're developing to have this or that symbol list imported from a
"portable-socket" package instead of directly from the local socket
package, whatever it's called. In systems that don't have a suitable
function set, you can "roll your own" and import that instead, so only
the portable package declaration and your personalized TCP wrappers
change from system to system.

That said, I'd appreciate a package that captures the TCP and UDP APIs,
but I'd just as soon it not have socket as a name or nickname. People
can always add it if they just want portability between openmcl and acl.

h

Gary Byers wrote:
> 
> At first glance, I'm inclined to do something like:
> 
> (defpackage "SOCKET"
>   (:use "CL")
>   (:nicknames "OPENMCL-SOCKET" "TBD")  ; or something
>   (:import-from "CCL" "MAKE-SOCKET" ...)
>   (:export "MAKE-SOCKET" ...))
> 
> e.g., leave the symbols in question exported from the CCL package,
> but export them from a SOCKET package as well.
> 
> On Sun, 30 Jun 2002, John Wiseman wrote:
> 
> > Hello.  I was just wondering whether, since openMCL's socket API is
> > not compatible with MCL's TCP/IP interface, but is based on ACL's
> > socket API, whether perhaps it could even be moved to a new SOCKET
> > package (which is what ACL uses) for even greater cross-lisp
> > compatibility.
> >
> > (Actually ACL uses the package ACL-SOCKET, with nickname SOCKET. So
> > Maybe OpenMCL could have MCL-SOCKET, etc.)
> >
> > I realize there is a long tradition of all the "extra stuff" in the
> > MCL family being in the CCL package (the name itself pretty much gives
> > away the "long tradition" part), but if it were moved to SOCKET
> > instead it would make it vastly easier to write code that would work
> > in multiple lisps.  No read-time conditionals required.
> >
> 
> I think that I've seen some ACL code that uses SOCKET-package things
> that aren't in OpenMCL, and there may be socket-related things in
> OpenMCL that aren't in ACL.  That said, I think that your suggestion
> would mean "no read-time conditionals required" for most programs,
> and that seems like a good thing.
> 
> >
> > John
> >
> >
> 
> Gary Byers
> gb at clozure.com
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list