On Tue, Jul 16, 2013 at 11:18:31AM +0200, Dicebot wrote: > On Tuesday, 16 July 2013 at 08:19:10 UTC, H. S. Teoh wrote: > >Just discovered a new trick in D: struct inheritance using alias > >this. :) > > Wasn't this stated in TDPL as one of primary design rationales behind > "alias this"? :)
Haha, you're right. I read it before but apparently the only thing that stuck in my mind is that alias this is to allow a type to masquerade as another type. But looking at the relevant sections again, Andrei did describe it as "subtyping", both w.r.t. classes and structs. Touché. :) T -- Mediocrity has been pushed to extremes.
