Appender.put return value

2014-07-24 Thread JR via Digitalmars-d-learn
Is there a big reason why Appender.put doesn't return &this? http://dpaste.dzfl.pl/bb840e3e349e It would allow for convenient chaining. :<

Re: Appender.put return value

2014-07-24 Thread Temtaime via Digitalmars-d-learn
Offtop It's better to return "this" and have return type "ref auto" i think.

Re: Appender.put return value

2014-07-24 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 24 July 2014 at 17:43:36 UTC, JR wrote: Is there a big reason why Appender.put doesn't return &this? http://dpaste.dzfl.pl/bb840e3e349e It would allow for convenient chaining. :< AFAIK, no reason no. That said, it wouldn't be useable in generic code.