Browse thread
[Caml-list] How to read three integers from a text-file... ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Xavier Leroy <xavier.leroy@i...> |
| Subject: | Re: [Caml-list] input_line |
> 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