Re: Trivial (but not bikeshed please) question of style…

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 28 01:44:00 PDT 2014


On 10/28/2014 1:15 AM, Russel Winder via Digitalmars-d wrote:
> This has all the appearance of a potential troll, but that is not my
> intention, I really do need to know which the community feels is
> idiomatic D.


It's a good question. I prefer:

    parent.send(result)

when doing a "pipeline" style operation, like:

    parent.send(result).doSomethingElse().finishUp();

and when using 'send' to extend a struct/class interface, and parent is a 
pointer to the struct/class.

Otherwise, I use the traditional function style.


More information about the Digitalmars-d mailing list