From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA06558; Thu, 29 Apr 2004 12:14:00 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA06527 for ; Thu, 29 Apr 2004 12:13:58 +0200 (MET DST) Received: from smtp.mbg.ocn.ne.jp (mbg.ocn.ne.jp [210.190.142.181]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3TADvYM008952 for ; Thu, 29 Apr 2004 12:13:57 +0200 Received: from localhost (p48100-adsau14honb7-acca.tokyo.ocn.ne.jp [221.187.101.100]) by smtp.mbg.ocn.ne.jp (Postfix) with ESMTP id D58AC6090; Thu, 29 Apr 2004 19:13:55 +0900 (JST) Date: Thu, 29 Apr 2004 19:13:19 +0900 (JST) Message-Id: <20040429.191319.85422851.yoriyuki@mbg.ocn.ne.jp> To: warplayer@free.fr Cc: info@gerd-stolpmann.de, caml-list@inria.fr Subject: Re: [Caml-list] Re: Common IO structure From: Yamagata Yoriyuki In-Reply-To: <007a01c42c8b$00941ec0$19b0e152@warp> References: <016401c42bc4$b6438840$19b0e152@warp> <1083013017.8842.327.camel@ice.gerd-stolpmann.de> <007a01c42c8b$00941ec0$19b0e152@warp> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 yamagata:01 yoriyuki:01 yoriyuki:01 cannasse:01 warplayer:01 caml-list:01 2004:99 yamagata:01 char:01 buffered:01 buffered:01 buffer:01 buffer:01 extlib:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: "Nicolas Cannasse" Subject: Re: [Caml-list] Re: Common IO structure Date: Tue, 27 Apr 2004 21:08:18 +0200 > - Yamagata Yoriyuki want IO to be on a char basis (and that makes sense for > Unicode) > - you would prefer having buffered channels (and that make sense for network > protocols, parsing, ...) > - I propose that we have two way of accessing the channel, that can be > buffered or unbuffered, or others. I think this is enough general to cover a > lot of different usage, and introduce some interesting polymorphism. > I would like to get your opinion on that. I agree buffered I/O for byte-char I/O. I prefer object ... input : string -> int -> int -> int ... end object ... output : string -> int -> int -> unit ... end than your nread/nwrite though. I am against buffered I/O for polymorphic channels, because it would not be easy to come up with a standard for buffer types. All arguments for buffered I/O raised in the list are so far about byte-character I/O (including UTF-8 channels.) Di-polymorphic channels are interesting, but unless we have a standard for buffer types, it would not be useful for the standard. It will be easy to write a mapping from uni-polymorphic channels to Di-polymorphic channels and vice verse, so IO system of Extlib does not need to change. In the future, when Extlib IO is widely used, we could regard Extlib IO as the standard. Since we do not have even common Unicode character type, we can not discuss standardization of Unicode channels. (one thing at a time!) Please see my all arguments about Unicode channels as an example of polymorphic channels. I still believe my proposal in the previous mail http://caml.inria.fr/archives/200404/msg00716.html is reasonable, except for the method names. -- Yamagata Yoriyuki ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners