From: John S. <sk...@us...> - 2005-05-30 01:37:59
|
On Sun, 2005-05-29 at 16:25 +0200, Christophe TROESTLER wrote: > You haven't much looked at the code, have you. No, i haven't. > Also, from a point of view of efficiency, providing efficient low > level data-structures that become inefficient (compared to a direct > implementation) when wrapped to do what the user really wants is a > waste of computer and human resources. No dispute. The problem is deciding 'what the user really wants'. For some interfaces that is easy, for others it is not. Just try to design a graph library for example :) > It is quite funny to take the [splice] function as a justification for > your design when, IMO, its utility is far lower than the possibility > of having empty lists. In your opinion. However it is NOT my design. I suggested to the original author a nodes-only interface would be more appropriate. I am simply stating it again as best I can, so you can understand the rationale. I'm not claiming it is the best design for Extlib, I'm just explaining that there is a reason it is the way it is. Reopening the discussion is fine by me. If there is a decision to replace the existing code, that is fine by me too. I don't use dlist, it won't affect me. In fact I don't use extlib either (it's too heavy to include in source form in my product). > In the end, it all boils down to which ADT we want to build. Yes. I agree. Except I'd say 'ADTS' plural. > > Also, I can't contribute any experience with the particular > > implementation in Extlib, because I don't use it. > > But eventually intend to? Not in the Felix project, unless INRIA adopts it, which was the original hope. For some other Ocaml development, I may well use it. Part of the reason is enums: they're central to the design of extlib, they're a great idea, the implementation is probably efficient .. but I have some misgivings about the interface. So I'm in the interesting position I think enums are important and useful but not quite right: roughly speaking they confuse forward and input iterators, which C++ takes pains to distinguish: input iterators MUST use eager semantics (or at least schedulable semantics), whereas forward iterators would use lazy semantics. -- John Skaller, skaller at users.sf.net PO Box 401 Glebe, NSW 2037, Australia Ph:61-2-96600850 Download Felix here: http://felix.sf.net |