
30 Sep
2004
30 Sep
'04
6:55 a.m.
David Abrahams writes:
Yeah. It's hard to imagine how "compile-time multimethods" would be
any different from what C++ already provides in terms of overload
resolution and partial ordering.
The main difference is that they work when particular types of participants are unknown at compile time. It is just like trying to implement unary virtual method using overloading. Jesse Jones writes:
Can a static library do better type
checking? In particular can it figure out, at compile time, if there
are no applicable methods or no unambiguous method?
Yes. The compile-time library detects ambiguity and absence of proper method. It is compile-time error.