Isn't this just as good?
Key[] keys;
keys.reserve(num_keys)
foreach (key; keys_in_aa)
keys ~= key;
On Fri, 09 Mar 2012 01:59:34 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Thursday, March 08, 2012 22:05:57 H. S. Teoh wrote:
On Thu, Mar 08, 2012 at 09:13:13PM -0800, H. S. Teoh wrote:
So, I'm plodding along with my AA implementation that *hopefully* will
eventually reach the
On Fri, Mar 09, 2012 at 03:10:21PM +0100, Andrej Mitrovic wrote:
Isn't this just as good?
Key[] keys;
keys.reserve(num_keys)
foreach (key; keys_in_aa)
keys ~= key;
I suppose that should work.
Although it does open up a new can of worms: reserve is @system and also
impure. I can see
So, I'm plodding along with my AA implementation that *hopefully* will
eventually reach the point where it's usable enough to be dropped into
druntime. I'm writing .keys and .values right now, and wondering what's
the best way to construct the returned array.
Obviously, using =~ repeatedly is a
On Thu, Mar 08, 2012 at 09:13:13PM -0800, H. S. Teoh wrote:
So, I'm plodding along with my AA implementation that *hopefully* will
eventually reach the point where it's usable enough to be dropped into
druntime. I'm writing .keys and .values right now, and wondering what's
the best way to
On Thursday, March 08, 2012 22:05:57 H. S. Teoh wrote:
On Thu, Mar 08, 2012 at 09:13:13PM -0800, H. S. Teoh wrote:
So, I'm plodding along with my AA implementation that *hopefully* will
eventually reach the point where it's usable enough to be dropped into
druntime. I'm writing .keys and