method generation by name

Daniel Keep daniel.keep.lists at
Mon Jul 23 18:43:24 PDT 2007

The other problem with the alias trick is that you can't alias a private
member.  Which means that something like this doesn't work:

class Foo
    private char[] toStringImpl() { ... }
    version( Tango )
        alias toStringImpl toUtf8;
        alias toStringImpl toString;

Which, of course, extends to string mixins.

	-- Daniel

More information about the Digitalmars-d-learn mailing list