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 PAA19561; Thu, 29 Apr 2004 15:03:38 +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 PAA19455 for ; Thu, 29 Apr 2004 15:03:37 +0200 (MET DST) Received: from gatekeeper.elmer.external.excelhustler.com (gatekeeper.excelhustler.com [68.99.114.105]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3TD3ajq015317 for ; Thu, 29 Apr 2004 15:03:36 +0200 Received: from chatterbox.elmer.internal.excelhustler.com (unknown [192.168.0.12]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "chatterbox.elmer.internal.excelhustler.com", Issuer "excelhustler.com" (not verified)) by gatekeeper.elmer.external.excelhustler.com (Postfix) with ESMTP id A08A3E0235; Thu, 29 Apr 2004 08:03:35 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 4A7975C006; Thu, 29 Apr 2004 08:03:35 -0500 (CDT) Received: from wile.internal.excelhustler.com (wile.internal.excelhustler.com [192.168.1.34]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 1DE915C005; Thu, 29 Apr 2004 08:03:35 -0500 (CDT) Received: by wile.internal.excelhustler.com (Postfix, from userid 1000) id 13AD01B058; Thu, 29 Apr 2004 08:03:35 -0500 (CDT) Date: Thu, 29 Apr 2004 08:03:35 -0500 From: John Goerzen To: Yamagata Yoriyuki Cc: ben@socialtools.net, caml-list@inria.fr Subject: Re: [Caml-list] Re: Common IO structure Message-ID: <20040429130335.GA11323@excelhustler.com> References: <20040428034415.GB19564@complete.org> <40902265.9040702@socialtools.net> <20040428214442.GE10198@excelhustler.com> <20040429.192746.48535796.yoriyuki@mbg.ocn.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040429.192746.48535796.yoriyuki@mbg.ocn.ne.jp> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Scanned-By: clamscan at chatterbox.elmer.internal.excelhustler.com 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 2004:99 0900,:01 yamagata:01 yoriyuki:01 python:01 readline:01 extlib:01 abstractions:01 readline:01 encodings:01 implemented:01 unicode:01 unicode:01 sockets:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Apr 29, 2004 at 07:27:46PM +0900, Yamagata Yoriyuki wrote: > > > >Python is simple. One standard for everything. You get read(), > > > >write(), readline(), readlines(), xreadlines() (hello Extlib, this one's > > > >for you), seek(), etc. This can apply to files, strings, sockets, > > > >pipes, whatever. Before we can start fussing about unicode > > > >abstractions, I think we need to have a uniform I/O layer. > > > > > > OK, but then you can leave out readline(), readlines() and xreadlines(), > > > because they don't make any sense unless you've already dealt with > > > character encodings. > > > > No, they can simply be implemented in terms of read(). > > It will break when UTF-16/UTF-32 are used. The line separator should > be handled after code conversion. At least that is the idea of > Unicode standard. (But Since Unicode standard is challenged by > reality in every aspect, maybe nobody cares.) You are missing the point. read() could handle the code conversion. -- John ------------------- 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