New hash
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Mar 23 21:49:30 PDT 2012
On Sat, Mar 24, 2012 at 05:12:00AM +0100, Andrej Mitrovic wrote:
> On 3/24/12, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> > Fix pushed to github. :-)
>
> Okay. Then I have some eye-candy for you:
I have a much simpler version:
template Assoc(T)
{
static if (is(T K : V[K], V))
alias AA!(K,V) Assoc;
else
static assert(0);
}
:-)
[...]
> With this, you can now use this syntax:
> Assoc!(int[string]) aasi;
> Assoc!(dstring[int]) aaid;
>
> I think this can make testing easier.
Cool. Should I just replace the current AA alias with Assoc? I think
this is far more concise, and much easier to convert to "real" AA syntax
when we integrate with druntime/dmd.
T
--
Written on the window of a clothing store: No shirt, no shoes, no service.
More information about the Digitalmars-d
mailing list