Nick Sabalausky:
> So as nice as it would be to use AA initializers at the module-level, this
> carries a hidden danger which could be a royal PITA to debug (especially for
> D newbies), so I don't think it's a good thing to do.
I see. Thank you for your answer.
Bye,
bearophile
"bearophile" wrote in message
news:j8eflp$q3o$1...@digitalmars.com...
> 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() {}
>
You generally need to
Le 28/10/2011 19:18, Dominic Jones a écrit :
Hello,
I want to compute, for example
d = a + b + c
where a..d are of some derived type, without incurring the cost of temporaries
for each overloaded operation.
In a similar post a while ago, Walter Bright proposed using function literals
instead
Hello,
I want to compute, for example
d = a + b + c
where a..d are of some derived type, without incurring the cost of temporaries
for each overloaded operation.
In a similar post a while ago, Walter Bright proposed using function literals
instead of template expressions to do this. After looki
On Friday, October 28, 2011 13:24:58 Dominic Jones wrote:
> To conclude the matter regarding the absence of a FIFO stack in the
> standard library and the not so good alternative of arrays (in
> particular where there are a significant number of push-pops and the
> maximum length is not initially k
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() {}
Bye,
bearophile
To conclude the matter regarding the absence of a FIFO stack in the
standard library and the not so good alternative of arrays (in
particular where there are a significant number of push-pops and the
maximum length is not initially known):
Does anyone in-the-know know if something like "DList" (a