tl;dr Instead of returning an object that uses local state, return an
object that uses member variables.
We've discovered one such allocation inside std.format.sformat today
during our local meetup[1], started fixing it, and discovered that it
has already been fixed by ag0aep6g just 19 days ag
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!
On Fri, Sep 20, 2019 at 01:03:29PM +, 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!
On Friday, September 20, 2019 5:21:22 AM MDT Ali Çehreli via Digitalmars-d-
learn wrote:
> tl;dr Instead of returning an object that uses local state, return an
> object that uses member variables.
The other issue this helps with is problems related to having multiple
contexts. IIRC, without it, s