digitalmars.D.learn - Appender.put return value
- JR (3/3) Jul 24 2014 Is there a big reason why Appender.put doesn't return &this?
- Temtaime (3/3) Jul 24 2014 Offtop
- monarch_dodra (3/6) Jul 24 2014 AFAIK, no reason no. That said, it wouldn't be useable in generic
Is there a big reason why Appender.put doesn't return &this? http://dpaste.dzfl.pl/bb840e3e349e It would allow for convenient chaining. :<
Jul 24 2014
Offtop It's better to return "this" and have return type "ref auto" i think.
Jul 24 2014
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.
Jul 24 2014