On Tuesday, 28 October 2014 at 08:15:58 UTC, Russel Winder via Digitalmars-d wrote:
        parent.send(result)

or:

        send(parent, result)

as being idiomatic D code?

I cannot speak for idioms, but this is a good example of how UFCS fails to capture the semantics of dot notation.

"X.action(Y)" will in most OO languages mean do "action" to object "X", but "parent.send(results)" means the opposite?! That's not good.

"send(parent,result)" is therefore better.

Reply via email to