[D-runtime] dup attributes?

Steve Schveighoffer schveiguy at yahoo.com
Fri Aug 6 04:09:08 PDT 2010





----- Original Message ----
> From: Fawzi Mohamed <fawzi at gmx.ch>
> 
> well it is not so clear to me what the  flags of a~b should be if the flags of 
>a & b happens to be different.
> I  think that probably always using the default type flags from the typeinfo 
>for  the result is the way to go.

What about an intelligent choice?  For example, the NO_SCAN bits should be 
and-ed.  That's what I was thinking.  But of course, this means N flag lookups, 
so there is a performance concern.

> Append on the other end, a~=b should  preserve the flags of a.
> If the space is correctly reserved the realloc part  should just be called 
>log(N) times, so the cost is ok IMHO.

Append already is this way.

> Dup should  likewise preserve the  flags.

OK, good, I agree there.  The cost is relatively constant.

-Steve



      


More information about the D-runtime mailing list