DMD 1.031 and 2.015 releases

aarti_pl aarti at interia.pl
Wed Jun 18 15:29:07 PDT 2008


Walter Bright pisze:
> Some new stuff to make writing templates easier.
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.031.zip
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.015.zip

Out of curiosity... Why have you implemented template constraints syntax 
using additional pair of parenthesis?

Some time ago I proposed syntax to extend templates matching. It is in 
enhancement:
http://d.puremagic.com/issues/show_bug.cgi?id=1827

Was it difficult to implement? Or you didn't want to break current syntax?

IMHO proposed syntax is much better:
- shorter: U: U[N], uint N against U N : U[N=uint]

- natural order of declaration / definition. See above: in my 
proposition N is declared before using it.

- extensible: if implemented for every case I proposed we would have 
already possibility to check sth. like this in templates:
void foo(T : class)() {}

- applicable for not only templates, but also is(), alias and static 
if/static assert.

I can not stop thinking that you try to get a lot with just a minimal 
effort. But maybe low hanging fruits for D are already in basket?

Could you please give some feedback, so I would feel a bit better with 
current syntax :-)

Best Regards
Marcin Kuszczak


More information about the Digitalmars-d-announce mailing list