The quotation is easily disposed of: just change comp = esc(comp) into comp = esc(expr(:quote, comp)) above.
I also think that a list of some kind would make for nicer syntax, e.g.
@delegate_first MyContainer elems [size, length, ndims, endof]
I also think that it could come in handy. Not sure about the patterns of delegation though, I suppose common patterns should be supported.
Then the macro name should probably describe the pattern of delegation, e.g. @delegate_first for the macro above.
Also, if we ever get to Stefan's idea of overloading apply, unifying functions and types, I guess that your example could instead be expressed something like
apply(f::Union(Type{size},Type{length},Type{ndims},Type{endof}), x::MyContainer,args...) = f(x.elems,args...)
which seems like a more general and perhaps more transparent format. At least the delegation pattern is obvious.
One idea could be to mimic this kind of syntax for the macro. If the main purpose is to be able to overload several functions in a similar manner,
perhaps something in the spirit of
@template (f<:Union(size, length, ndims, endof))(x::MyType, args...) = f(x.elems, args...)
This would repeat the function definition once with
f bound to each of the four functions. I could write it if it would be desired.