From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!nerim.net!usenet-fr.net!proxad.net!proxad.net!newspeer2.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn?= Persson Subject: Re: typed pipes Newsgroups: comp.lang.ada References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <_nMDh.34647$E02.13753@newsb.telia.net> User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Message-ID: Date: Sat, 24 Feb 2007 16:33:44 GMT NNTP-Posting-Host: 83.251.159.188 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1172334824 83.251.159.188 (Sat, 24 Feb 2007 17:33:44 CET) NNTP-Posting-Date: Sat, 24 Feb 2007 17:33:44 CET Organization: Telia Internet Xref: g2news2.google.com comp.lang.ada:9492 Date: 2007-02-24T16:33:44+00:00 List-Id: Jacob Sparre Andersen wrote: > I am not sure if I would want the system to _force_ both ends of the > pipe to agree, but I would definitely want the reading end to be > _informed_ of what the writing end is doing. > > But doing the Unchecked_Conversion once the data are inside the > reading process is probably the correct solution. > > This could probably not be done on the shell level, since pipes are an > operating system feature, and not just a shell feature. No, it definitely couldn't be done in a Unix shell. It would require very deep changes to how the kernel handles files, including changes to the system calls. And if you had it for pipes you'd want it for disk files too, which would affect the filesystems. I suspect that the resulting operating system would be almost, but not quite, entirely unlike Unix. And how could you make it work for all programming languages? Types are very much a programming language concept. I suppose you could design it so that an Ada program could communicate "type File_Record is -18 .. 7000;" to another Ada program, while a C program would see "int16_t", but how would you explain tagged types, discriminants and stuff to C? And then there are other languages with types that can't be expressed in Ada. -- Bj�rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu