From: Barry Margolin
Subject: Re: `read-sequence' and sockets
Date: 
Message-ID: <xjs52.139$Ki.1197845@burlma1-snr1.gtei.net>
In article <··············@eho.eaglets.com>,
Sam Steingold  <···@goems.com> wrote:
>`read-sequence' doesn't specify whether it reads bytes or chars, leaving
>that for the stream to decide.  

It reads whatever the STREAM-ELEMENT-TYPE is.  Which needs to be compatible
with the type of the sequence it's storing into.

>				 what if the stream happened to be a
>socket?  most implementations provide this extension, but they disagree
>on what `read-sequence' should do with them (clisp refuses to do
>anything and instead provides `read-byte-sequence' and
>`read-char-sequence' for sockets; allegro insists on using chars).

This seems pretty arbitrary.  At the level of the read() system call, Unix
doesn't distinguish between sockets and other types of streams; they're all
just byte streams.

>Any chance X3J13 will ever specify this?

Seems unlikely.  Language specifications generally avoid dealing with
OS-specific details like networking.  Although, now that TCP/IP stacks
are as almost as ubiquitous as hierarchical file systems, it might make
sense to have some generic interfaces.  Java, as a language specifically
directed towards networked applications, is leading the way in this.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.