On Wednesday, 24 June 2015 at 00:16:49 UTC, Tofu Ninja wrote:
But now you are going to have to come up with a clever name for every replacement and the clarity of each will be shoty at best. The append lazy convention at least is a convention that is very clear, the other way has no rules, you just are making up new names.

A UFCS chain of functions full of the word 'lazy' is going to look pretty clunky.

auto gubbins = guns.setStuffLazy.doMoreThingsLazy.turnOnLasersLazy.fireLasersLazy.coolLasersLazy;

Would using the same names be a possibility for lazy and eager functions? At least going forward. Default to lazy and instantiate as eager otherwise. Is it possible to make a meta template that would instantiate all functions in a chain as lazy or eager as desired?

setExt!"eager" and setExt

Reply via email to