From: Brian H. <bri...@ql...> - 2003-04-17 20:39:23
|
On Thu, 17 Apr 2003, Remi Vanicat wrote: > Well, is there I want to remind that those enumeration really look like > Stream. one could use Stream for this. Haven't looked at streams- although I thought they required Camlp4? Plus, does this mean we have to do a List.of_stream and PSQueue.of_stream etc? > > > > > So I propose that count be allowed to return -1 to indicate "length > > unknown". Throwing an exception might also be an idea. > > Throwing an exception is much better. Yeah. That catchs the case where bad programming forgot to handle the unknown length case. Although I suppose we could also have count return: type count_t = Known of int | Unknown We're introducing a pointer dereference- but I don't think count is generally that big of a performance limit. Brian |