On 09/03/07, skaller wrote: > > > BOTH Ocaml functors and overloading are just hacks to > work around the lack of ability to properly express > higher order natural transformations. Hm... indeed, but for some operations, you cannot provide a single, general definition - say for length operation, or for * (* is very different when it comes to scalars, vectors and matrices - not even the same axioms hold). I believe that the basic operations should be implemented using overloading (actually, some smart overloading that would allow both static and (seemingly) dynamic resolving) and then polyadic operations be built on top of that. For systems like Ocaml, you need a mix of sloppiness > and heavy typing, because unless you're implementing > a well understood mathematical formalism, too much > formality and abstraction just gets in the way. > > For example if you were implementing a C++ compiler in Ocaml > I'm going to bet you'd want plenty of space to fiddle with > your representations and concepts, because you don't quite > know what it is you're actually implementing. > I have a feeling what you say here is important, yet I don't quite understand it... Can you clarify it ang give an example? And how (in your opinion) can this problem be solved? - Tom