From: Alan P. <ap...@re...> - 2003-10-06 23:36:40
|
In article <Pine.LNX.4.44.0310061648040.21186-100000@localhost.localdomain>, Brian Hurt wrote: > You might want to fix your Message-ID header generation, though admittedly with all that stuff in front of the @, perhaps the brokenness won't cause any actual problems. > I think objects are the *natural* representation for enumerations. > You have internal state shared among multiple functions (data > hiding), multiple implementations of the same methods (inheritance), > and a specified contract for the API (interfaces). This is OO all > over. How is the ocaml object system better for these than a struct of closures (e.g. the current implementation)? The type of the struct is the interface (Enum.t). Closures can have shared, private data. Inheritance is much more flexible with the struct-of-closures approach. |