On Fri, Oct 29, 2010 at 2:05 PM, John Cowan <cowan@x>
As chair of WG2, that is exactly what I expect to see happen. The WG
On Fri, Oct 29, 2010 at 4:35 PM, Thomas Bushnell, BSG <tb@x
> I would be happy if Scheme-2 said "this is how we map to Posix.1
> facilities", and very unhappy if they started deciding what a good
> networking interface looks like.
has rejected providing a complete interface to Posix (which after all
has almost 1200 functions, macros, and variables declared in over 80
header files), so I'm looking at various other Schemes to see which
parts of Posix they provide. Similarly, WG2 will not have a complete
socket interface, but will be providing support for TCP and UDP
clients and servers (you can see my UDP proposal at
http://trac.sacrideo.us/wg/wiki/DatagramChannelsCowan; it is slightly
more convenient than raw Posix but not fundamentally different).
I don't know what "this" refers to in your first sentence. It seems that it refers exactly to my worry that you'll start redesigning what a good networking interface looks like. Can you PLEASE not try to be "more convenient", and instead focus on clear and transparent mappings to the extremely well-understood functions that Posix provides?
Notice the way that the standard C interfaces carefully separate hostname translation from socket operations, for example. This is really important, but it's entirely skipped by your interface, which has no concept of an "address" apart from a particular serialized string representation of one.
When I use datagram-channel-receive-from, what datatype is the host returned? A string? A dotted quad notation? Does it do a reverse name lookup? What if it fails?
We're supposed to guess what the PORT argument is, which is annoying given that there are both numeric names and string names for ports. Can I pass a string and get magical transformation from getservent? What if the string is a series of digits and there is a service with those digits defined as a symbolic name?
This is EXACTLY the kind of bad improperly specified interface which language designers traditionally write, especially in the Lisp world.
Can you please think about either specifying some rules-of-thumb with examples for Posix bindings, or let OS designers design operating systems, and stick to programming languages?
To tighten up your UDP interface, you need a datatype for addresses, one for IPv4 and a different one for IPv6. You need a hostname translation function which is not bundled magically into everything else.
What is "datagram-channel-interface" supposed to return? Is there some "interface" datatype? Or a string? What if the channel receives datagrams on two of my host's five interfaces? Or all of them? What does "datagram-channel-connected-host" return? (Does it return whatever was passed at connect time, or does it return the value of getpeername, or does it return a reverse lookup of the value of getpeername, or does it return a canonicalized version of what was passed at connect time?)
As it sits, this is a disaster, and is exactly why I expressed my hope that you would not adopt this usual disastrous strategy. I understand that Posix is a lot of work, but better to say we're not up to it than to do the usual half-baked thing.