The demise of T[new]

grauzone none at example.net
Tue Oct 20 09:14:01 PDT 2009


Steven Schveighoffer wrote:
> I still think having an Appender object or struct is a worthwhile thing, 
> the "pre-allocate array then set length to zero" model is a hack at best.

Would that work with Andrei's append cache at all? Setting the length to 
zero and then appending is like taking a slice of length 0 and then 
appending.

Maybe introduce a write/readable .capacity property, that magically 
accesses the cache/GC?

> -Steve



More information about the Digitalmars-d mailing list