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 PAA22975; Mon, 26 Apr 2004 15:53:35 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA22652 for ; Mon, 26 Apr 2004 15:53:34 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3QDrPjq010892 for ; Mon, 26 Apr 2004 15:53:28 +0200 Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id WAA18404; Mon, 26 Apr 2004 22:53:18 +0900 (JST) Date: Mon, 26 Apr 2004 22:53:18 +0900 (JST) Message-Id: <20040426.225318.68533471.garrigue@kurims.kyoto-u.ac.jp> To: yoriyuki@mbg.ocn.ne.jp Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Common IO structure From: Jacques GARRIGUE In-Reply-To: <20040426.221606.71081508.yoriyuki@mbg.ocn.ne.jp> References: <20040425.175623.71081314.yoriyuki@mbg.ocn.ne.jp> <00cb01c42afd$7fc1b430$19b0e152@warp> <20040426.221606.71081508.yoriyuki@mbg.ocn.ne.jp> X-Mailer: Mew version 4.0.64 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 jacques:01 yamagata:01 yoriyuki:01 yoriyuki:01 outputs:01 jacques:01 equality:01 int:01 int:01 flush:01 garrigue:01 garrigue:01 native:02 objects:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Yamagata Yoriyuki > What I want is more than that. I want that we agree some minimal set > of methods for IO channles, and agree to accept such an IO channel as > an argument for our library functions, or provide a converter to a > native IO channel of the library. [...] > (for output) > object > output : string -> int -> int -> unit > flush : unit -> unit > close : unit -> unit > end > ([c#output s pos len] outputs [len] characters from the position > [pos]) All this seems reasonable. Note that Format also uses [spaces] and [newline], but there are reasonable defaults for them. This also emphasizes one of the advantages of objects: since their types can be compared for equality, several libraries can use the same type without requiring a common header (that is, if everybody agrees on the interface, as you suggest). Jacques Garrigue ------------------- 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