Re: why use string for this example of appender?

2021-04-01 Thread ludo via Digitalmars-d-learn
Thank Steve, I open a new thread with some corrections, better title, etc. On Wednesday, 31 March 2021 at 22:05:12 UTC, Steven Schveighoffer wrote: On 3/31/21 5:32 PM, ludo wrote: [...] ArrayBuilder should be similar in performance to Appender. I think part of the issue with appender could

Re: why use string for this example of appender?

2021-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/21 5:32 PM, ludo wrote: Hi guys, I am working on an old software in D1, which defines at some point an array.d module. See my github file: https://tinyurl.com/5ffbmfvz If you go line 347, you see an ArrayBuilder struct, which is supposed to behave exactly like an array but with

Re: why use string for this example of appender?

2021-03-31 Thread ludo via Digitalmars-d-learn
Hi guys, I am working on an old software in D1, which defines at some point an array.d module. See my github file: https://tinyurl.com/5ffbmfvz If you go line 347, you see an ArrayBuilder struct, which is supposed to behave exactly like an array but with faster concatenation. The class

Re: why use string for this example of appender?

2018-04-16 Thread WhatMeWorry via Digitalmars-d-learn
Thanks all. I sometimes feel like Michael Corleone: "Just when I thought I was out, they pull me back in!" :) I realize it is not the place for it, but sometimes I wish the Library Reference explained things in terms of "why".

Re: why use string for this example of appender?

2018-04-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/16/18 4:49 AM, Ali Çehreli wrote: On 04/15/2018 11:46 PM, WhatMeForget wrote: > > I think I got a handle on D's static and dynamic arrays, till I come to > std.array and see all the shiny new tools. I can understand all the > replace.. functions, but the appender function gave me pause.

Re: why use string for this example of appender?

2018-04-16 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2018 11:46 PM, WhatMeForget wrote: > > I think I got a handle on D's static and dynamic arrays, till I come to > std.array and see all the shiny new tools. I can understand all the > replace.. functions, but the appender function gave me pause. The > documentation says appender "Returns

why use string for this example of appender?

2018-04-16 Thread WhatMeForget via Digitalmars-d-learn
I think I got a handle on D's static and dynamic arrays, till I come to std.array and see all the shiny new tools. I can understand all the replace.. functions, but the appender function gave me pause. The documentation says appender "Returns a new Appender or RefAppender initialized with a