From: Achim B. <bl...@la...> - 2004-04-09 12:20:45
|
Hello, > Here's another IO update : Just some remarks: o Wouldn't it be better to rename read_i32 and write_i32 to read_i31 and write_i31 ? Then you could add real read_i32 and write_i32 functions based on native ints. o read_line and read_string do not handle the case that the input becomes empty before the terminating character is read. o As already pointed out by someone else, using \0 as terminating character for strings is questionable. To support strings containing \0 one could store strings in the format "number of characters" + "data". o A slight optimisation of write_byte would be to use unsafe_char_of_int. o What about read_utf8 and write_utf8 ? o Have you made up your mind about supporting seekable streams? Achim -- ________________________________________________________________________ | \_____/ | Achim Blumensath \O/ \___/\ | LaBRI / Bordeaux =o= \ /\ \| www-mgi.informatik.rwth-aachen.de/~blume /"\ o----| ____________________________________________________________________\___| |