"Adam D. Ruppe" <destructiona...@gmail.com> wrote in message news:mailman.1171.1239998473.22690.digitalmar...@puremagic.com... > On Fri, Apr 17, 2009 at 03:54:47PM -0400, Nick Sabalausky wrote: >> What >> opDotExp is, is a tool of only occasional use that provides only a small >> benefit, *and* ends up destroying a much more important tool: >> compile-time >> checking on a class's members. > > Wouldn't the compile time checking remain the same on any class except > the Variant (or whatever) which implements the new operator? > > If it is constrained to one type, the destruction seems like it would be > acceptable. You can't trust much on a Variant at compile time anyway. >
The problem is there would be no way to tell at a glance whether a given class uses opDotExp or not. You'd have to go look it up for every class. So, ok, we could solve that by requiring a different syntax for dynamic invokation. But we already have that: just pass a string to a dispatch function.