Re: reddit.com: first Chapter of TDPL available for free

2009-08-16 Thread Ali Cehreli
language_fan Wrote: > One way to teach languages with both high and low level concepts is to > start bottom-up. Surely the high level concepts are usually built from > atomic low level artifacts. I agree. I am writing an online D tutorial that targets the novice programmer, where the concepts

Re: The future of D 1.x

2009-08-16 Thread Dominik
"Jeremie Pelletier" wrote in message news:h680bh$2lb...@digitalmars.com... > Dominik Wrote: > >> Is there any or there will be a "big switch" to 2.x once it is considered >> final/stable? > > I already made the switch to D2 almost a year ago, and definitely wont be > going back to D1. I didn't

Partial specialisation is foobarred?!

2009-08-16 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've been poking around on the bug track and can't find a specific bug report, but it seems unlikely this hasn't been noticed before. This is w/ dmd 2.031 & 1.046 // import std.stdio; struct nil { } class D(T) { uint _l

Re: The future of D 1.x

2009-08-16 Thread Nick Sabalausky
"Dominik" wrote in message news:h68k5g$17s...@digitalmars.com... > > thanks for reply - what attracted me to D was D1/Tango combination and I > think I wouldn't use D without Tango at all - I have no idea what Phobos2 > brings to the table in practice yet, but from what I can see it does not >

Re: The future of D 1.x

2009-08-16 Thread Lutger
Dominik wrote: ... > thanks for reply - what attracted me to D was D1/Tango combination and I > think I wouldn't use D without Tango at all - I have no idea what Phobos2 > brings to the table in practice yet, but from what I can see it does not > look like a suitable replacement. Though they overl

Re: Partial specialisation is foobarred?!

2009-08-16 Thread Jason House
FWIW, I usually use static if instead of specialization. In D2, you can also use if expressions as part of the template declaration. As far as your code below, I think the declaration of M without using it is suspect. I don't have a compiler to play with right now... div0 Wrote: > -BEGIN P

Re: The future of D 1.x

2009-08-16 Thread Dominik
"Lutger" wrote in message news:h68ngs$1ef...@digitalmars.com... > Though they overlap, phobos and tango do have different scopes and > somewhat > different programming styles. I understand taht completeley. I was more making a general statement that one of the reasons I am not considering D2

Re: Partial specialisation is foobarred?!

2009-08-16 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason House wrote: > FWIW, I usually use static if instead of specialization. In D2, you can also > use if expressions as part of the template declaration. As far as your code > below, I think the declaration of M without using it is suspect. I don't

Re: The future of D 1.x

2009-08-16 Thread Jeremie Pelletier
Dominik Wrote: > > "Lutger" wrote in message > news:h68ngs$1ef...@digitalmars.com... > > Though they overlap, phobos and tango do have different scopes and > > somewhat > > different programming styles. > > I understand taht completeley. I was more making a general statement that > one of th

escaping pointer to scope local array: bug or not?

2009-08-16 Thread HOSOKAWA Kenchi
It seems dmd 2.031 forgets scope attribute for array.ptr in some cases, so that it allows escaping a pointer to scope local array. I'm not sure this is a bug or a kind of "dangerous-but-valid". int[] a() { scope auto a = new int[1]; return a; // error; escaping reference to scope

Re: escaping pointer to scope local array: bug or not?

2009-08-16 Thread Robert Jacques
On Sun, 16 Aug 2009 10:13:42 -0700, HOSOKAWA Kenchi wrote: It seems dmd 2.031 forgets scope attribute for array.ptr in some cases, so that it allows escaping a pointer to scope local array. I'm not sure this is a bug or a kind of "dangerous-but-valid". int[] a() { scope auto a = ne