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 OAA22891; Tue, 30 Apr 2002 14:07:52 +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 OAA22887 for ; Tue, 30 Apr 2002 14:07:52 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3UC7K503964; Tue, 30 Apr 2002 14:07:20 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA22839; Tue, 30 Apr 2002 14:07:20 +0200 (MET DST) Date: Tue, 30 Apr 2002 14:07:20 +0200 From: Xavier Leroy To: Lauri Alanko Cc: caml-list@inria.fr Subject: Re: [Caml-list] input_line Message-ID: <20020430140720.A19609@pauillac.inria.fr> References: <4.3.2.7.2.20020424222749.02d10a90@mail.d6.com> <15557.14957.358556.545541@absurd.mimuw.edu.pl> <15557.14957.358556.545541@absurd.mimuw.edu.pl> <4.3.2.7.2.20020424222749.02d10a90@mail.d6.com> <4.3.2.7.2.20020425104214.02e42a90@mail.d6.com> <3CCA2C6E.5020007@ozemail.com.au> <20020427160209.GB675@la.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20020427160209.GB675@la.iki.fi>; from la@iki.fi on Sat, Apr 27, 2002 at 07:02:09PM +0300 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Vaguely related to this, I have some minor gripes about input_line. > Here's the implementation in 3.04: > It's obvious that this doesn't handle obnoxiously large newlineless > inputs very gracefully. Its complexity is quadratic and it's not tail > recursive. input_line was reimplemented in the working sources to avoid the quadratic behavior you mention. > And worst of all, there are no limits on the size of string > to be created. So a maliciously designed huge input could blow either > the stack or the heap. I wouldn't want to use input_line in a network > application. I see your point, but there are other (most?) applications where you really do not want to have any hard limits beyond available memory. - Xavier Leroy ------------------- 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