2 ms·
> methods that just call another method on the composed sub-object This is such a common pattern that adding syntactic sugar for it may be a good idea. Maybe s
by im3w1l 8y ago
> methods that just call another method on the composed sub-object
This is such a common pattern that adding syntactic sugar for it may be a good idea. Maybe something like
from x expose y, z, w
- TeMPOraL 8y agoIt would have to be something closer to: from x expose y->z->w otherwise you just wrote an alternative syntax for a wrapper, which then - in accordance with Law of Demeter - you'd have to repeat in y and z.
- im3w1l 8y agoIn my example x was a contained object, and y, z, w were member variables or methods on that object. A shorthand for wrappers was exactly what I intended.