Is there any nifty D features that allow one to simplify the
composite pattern,
e.g.,
class A : B
{
B b;
}
Where I would like to have class A's implementation of B be use
b. This would avoid a lot of boilerplate code if just redirecting
A's implementation of B to b.
e.g.,
class A : B(use b)
{
B b;
}
or maybe more D'ish
class A : B
{
B b;
alias b A:B;
}
probably some fancy mixin could be used:
class A : B
{
B b;
mixin simpleComposite(b); // Just implements B with
redirection to b
}

Sorry, I left out one important detail, B is an interface so A
has to implement B's methods. If B were class then this would not
be a problem and alias this would not be required, and I could
easily override any implementation details.
interface B { void foo(); }
class A : B { B b; void foo() { return b.foo(); } }
For each method in B, I have to write a duplicate method in A
that redirects to b. I do not want to do this and I also want to
partially implement B explicitly.
I think a mixin and traits could be used, at least to implicitly
implement all of B, but I'm not sure about only partially.

Unfortunately I can't test it until head is updated but it looks
close to what I'm wanting... not 100% sure though. At the very
least wrap is something similar to what I was trying to implement
more or less so I can look in that for details if I need to.

Is there any nifty D features that allow one to simplify the
composite pattern,
e.g.,
class A : B
{
B b;
}
Where I would like to have class A's implementation of B be use
b. This would avoid a lot of boilerplate code if just
redirecting A's implementation of B to b.
e.g.,
class A : B(use b)
{
B b;
}
or maybe more D'ish
class A : B
{
B b;
alias b A:B;
}
probably some fancy mixin could be used:
class A : B
{
B b;
mixin simpleComposite(b); // Just implements B with
redirection to b
}

You can also try to overload opCast() in the container class, a
bit in the same fashion that the 'alias this' stuff (except that
alias this will not work with many sub classes). The idea is
exposed here:
http://dpaste.dzfl.pl/33d1b2c3

Is there any nifty D features that allow one to simplify the
composite pattern,
e.g.,
class A : B
{
B b;
}
Where I would like to have class A's implementation of B be
use b. This would avoid a lot of boilerplate code if just
redirecting A's implementation of B to b.
e.g.,
class A : B(use b)
{
B b;
}
or maybe more D'ish
class A : B
{
B b;
alias b A:B;
}
probably some fancy mixin could be used:
class A : B
{
B b;
mixin simpleComposite(b); // Just implements B with
redirection to b
}

You can also try to overload opCast() in the container class, a
bit in the same fashion that the 'alias this' stuff (except
that alias this will not work with many sub classes). The idea
is exposed here:
http://dpaste.dzfl.pl/33d1b2c3

This isn't what I'm really after. At some point I might want to
implement the interface partially.
interface A { ... }
class B : A {
A a;
// implementation of A goes here, but I'd like it to just
redirect to a for all that I do not explicitly implement //
}
There seems to be some cool stuff that Kenji has used that I was
not familiar with. I'm not quite sure if it does exactly what I'm
asking but it looks close.

Is there any nifty D features that allow one to simplify the
composite pattern,
e.g.,
class A : B
{
B b;
}
Where I would like to have class A's implementation of B be
use b. This would avoid a lot of boilerplate code if just
redirecting A's implementation of B to b.
e.g.,
class A : B(use b)
{
B b;
}
or maybe more D'ish
class A : B
{
B b;
alias b A:B;
}
probably some fancy mixin could be used:
class A : B
{
B b;
mixin simpleComposite(b); // Just implements B with
redirection to b
}

You can also try to overload opCast() in the container class,
a bit in the same fashion that the 'alias this' stuff (except
that alias this will not work with many sub classes). The idea
is exposed here:
http://dpaste.dzfl.pl/33d1b2c3

This isn't what I'm really after. At some point I might want to
implement the interface partially.
interface A { ... }
class B : A {
A a;
// implementation of A goes here, but I'd like it to just
redirect to a for all that I do not explicitly implement //
}
There seems to be some cool stuff that Kenji has used that I
was not familiar with. I'm not quite sure if it does exactly
what I'm asking but it looks close.

You're right, actually my answer was a bit off-topic since it was
mostly related to the first 'Dicebot' answer and the 'alias this'
stuff. BTW it's not perfect since using the opCast doesn't allow
to 'mirror' several Objects of the same class...