Avoid gratuitous closure allocations

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Sep 20 15:00:52 UTC 2019


On Fri, Sep 20, 2019 at 01:03:29PM +0000, Andrea Fontana via Digitalmars-d-learn wrote:
> On Friday, 20 September 2019 at 11:21:22 UTC, Ali Çehreli wrote:
> > tl;dr Instead of returning an object that uses local state, return
> > an object that uses member variables.
> 
> Really good to know tips!

In fact, most (all?) of Phobos code is written this way.


T

-- 
Questions are the beginning of intelligence, but the fear of God is the beginning of wisdom.


More information about the Digitalmars-d-learn mailing list