Re: Purity of delegate-style toString

2018-05-06 Thread Q. Schroll via Digitalmars-d-learn
On Tuesday, 1 May 2018 at 12:03:15 UTC, ag0aep6g wrote: On 05/01/2018 01:44 PM, Per Nordlöw wrote: In which cases (if any) is it possible to make a delegate-style implementation of toString such as     void toString(scope void delegate(const(char)[]) sink) const @trusted pure     {   

Re: Purity of delegate-style toString

2018-05-01 Thread Per Nordlöw via Digitalmars-d-learn
On Tuesday, 1 May 2018 at 12:03:15 UTC, ag0aep6g wrote: By the way, you shouldn't mark toString as @trusted when `sink` is @system. Thanks

Re: Purity of delegate-style toString

2018-05-01 Thread ag0aep6g via Digitalmars-d-learn
On 05/01/2018 01:44 PM, Per Nordlöw wrote: In which cases (if any) is it possible to make a delegate-style implementation of toString such as     void toString(scope void delegate(const(char)[]) sink) const @trusted pure     {     // sink("...");     //