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 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.
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.