Adding overloaded methods

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Feb 24 12:08:00 PST 2012


On Fri, Feb 24, 2012 at 04:24:03PM +1300, James Miller wrote:
> On 24 February 2012 12:06, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> > On Fri, Feb 24, 2012 at 04:06:52AM +1300, James Miller wrote:
> >> On 23 February 2012 13:15, BLM <blm768 at gmail.com> wrote:
> >> > After messing around for a while, I figured out what is making
> >> > DMD choke on my file. The methods were defined in the base class
> >> > using template mixins, and apparently DMD doesn't like it when
> >> > mixins, inheritance, overloading, and aliases are all in the same
> >> > piece of code :)
> >>
> >> And the award for "Most Meta Code" goes too...
> > [...]
> >
> > I dunno, but "most meta" to me implies recursive mixins...
[.[..]
> True, I guess the "Most Meta Code" would be something that combines
> recursive mixins, string mixins, inheritance, overriding, overloading,
> aliases and is all inside a recursive template. Bonus points if the
> final result is a quine.
[...]

You forgot reflection. The quine would generate itself by reflecting
upon itself and reproducing itself via aliasing recursive mixins (by
which I mean string mixins that contain "mixin" in the string,
recursively) into a recursive template that generates a class hierarchy.

Bonus points if the code *in theory* would reproduce itself, but
actually causes dmd to run into an infinite loop. :P


T

-- 
If it breaks, you get to keep both pieces. -- Software disclaimer notice


More information about the Digitalmars-d-learn mailing list