resizeable arrays: T[new]
Daniel Keep
daniel.keep.lists at gmail.com
Mon Jun 4 03:06:26 PDT 2007
I agree with your reasoning for this (honestly, the solution had never
occured to me before, although looking back I can think of a few places
where it would have been quite useful), although I can't say I'm a fan
of the syntax. The "new" inside the brackets just looks strange; a new
what?
A few possible alternatives:
T[new] // Proposed
T[$] // Since $ already means "length" for arrays
T[*] // Indicating the index could be anything
T[..] // Bit of a stretch...
T[volatile] // Bit long
T[[]] // Just ugly
Like I said; I'm erring on the side of liking the idea, just not the use
of "new" in that particular spot.
-- Daniel
More information about the Digitalmars-d-announce
mailing list