Replace idiom, doesn't work well with multiple inheritance.