Re: Fake global associative array literals

2011-11-09 Thread sergk
On Fri, Oct 28, 2011 at 5:53 PM, bearophile wrote: > What do you think about a rewrite rule that changes code like: > > int[int] aa = [1:2, 3:4]; > void main() {} > > > Into: > > int[int] aa; > static this() { >    aa = [1:2, 3:4]; > } > void main() {} Its not quite same case, but still could be

Class template argument deduction from constructor call

2010-10-27 Thread sergk
class Foo(T) { this(T t) { bar = t; } T bar; } void main() { auto a = new Foo(123); // doesn't work auto b = new Foo!(int)(123); // work, but redundant } Is there any technical limitations preventing this, or its just a compiler bug? -- serg.

Re: D2.0 for first enterprise test

2010-07-24 Thread sergk
I have similar situation. My employer could consider to use D for prototyping or even production, but lack of linux armel cross compiler is show-stopper for us. -- serg.