Re: DMD 1.039 and 2.023 releases

2009-01-17 Thread bearophile
Denis Koroskin: void doSomething(T)(int i) { if (i == 0) { #if (is(T == A)) { A.SomeAlias x; #} else if (is(T == B)) { B.SubType x; #} else { T x; #} x = ... whatever } else int y = x;

Re: DMD 1.039 and 2.023 releases

2009-01-17 Thread Nick Sabalausky
Michel Fortin michel.for...@michelf.com wrote in message news:gksbop$2tt...@digitalmars.com... On 2009-01-16 22:17:57 -0500, Daniel Keep daniel.keep.li...@gmail.com said: The '#' has a nice connotation for anyone who's used to C/C++, given that those statements are handled at compile time.

Re: DMD 1.039 and 2.023 releases

2009-01-16 Thread Bill Baxter
On Sat, Jan 17, 2009 at 6:26 AM, Yigal Chripun yigal...@gmail.com wrote: bearophile wrote: Bill Baxter: To me it's hard to see those variable declarations as being anything other than scoped to the blocks they're in. So all I'm saying is if we could have some different delimiters for

Re: DMD 1.039 and 2.023 releases

2009-01-16 Thread Daniel Keep
Bill Baxter wrote: [snip] in C# they use the same syntax as the c pre-processor for conditional compilation and such even though C# doesn't have a pre-processor and the syntax is interpreted by the compiler. the above would be something like: void doSomething(T)(int i) { if (i == 0)

Re: DMD 1.039 and 2.023 releases

2009-01-10 Thread Stewart Gordon
Walter Bright wrote: snip Writing labeled block statements is something more likely to be generated by an automated D code generator, I still don't get it. and it's convenient to be able to control if a scope is generated or not. To force a block to create a scope: {{ ... }} To

Re: DMD 1.039 and 2.023 releases

2009-01-08 Thread bearophile
Bill Baxter: To me it's hard to see those variable declarations as being anything other than scoped to the blocks they're in. So all I'm saying is if we could have some different delimiters for non-scope blocks then it might be nice, and make it easier to see when scopes are ending and when

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Jarrett Billingsley
On Wed, Jan 7, 2009 at 12:31 AM, Walter Bright newshou...@digitalmars.com wrote: Regarding the pure optimizations done by D2, how can the LDC compiler do the same? Are them done by the front-end? I changed nothing with the compiler. I just rewrote the runtime long division function. Can

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Tom S
It appears that you've also fixed http://d.puremagic.com/issues/show_bug.cgi?id=2359 :D /* which might've been the same issue as http://d.puremagic.com/issues/show_bug.cgi?id=2527 */ Perhaps I can finally update from 1.031 : Thanks a bunch! -- Tomasz Stachowiak http://h3.team0xf.com/

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Extrawurst
Denis Koroskin wrote: On Wed, 07 Jan 2009 07:03:27 +0300, Bill Baxter wbax...@gmail.com wrote: 2009/1/7 Walter Bright newshou...@digitalmars.com: Faster long divides! No progress on faster long compiles though? --bb Small statistics on compilation time of my small project: DMD2.021 - 16

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread redsea
I'm happy to see Bugzilla 2518(scope(success) not execuate and RAII variable destructor is not called) has been fixed, Great ! I have some questions when I check dstress suite and Bugzilla. In Bugzilla 99, according to test case: int main(){ int i; label: {

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Walter Bright
torhu wrote: 1.039 hangs while trying to build my DWT app, just like 1.038 did. It just seems to never finish, so I kill it after a while. Don't know if it's related to this issue or not. I need a reproducible example.

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Walter Bright
redsea wrote: I'm happy to see Bugzilla 2518(scope(success) not execuate and RAII variable destructor is not called) has been fixed, Great ! I have some questions when I check dstress suite and Bugzilla. In Bugzilla 99, according to test case: int main(){ int i; label: { scope(exit) i++;

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Brad Roberts
Jason House wrote: Walter Bright Wrote: redsea wrote: I'm happy to see Bugzilla 2518(scope(success) not execuate and RAII variable destructor is not called) has been fixed, Great ! I have some questions when I check dstress suite and Bugzilla. In Bugzilla 99, according to test case:

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Denis Koroskin
On Thu, 08 Jan 2009 06:25:11 +0300, Brad Roberts bra...@puremagic.com wrote: Jason House wrote: Walter Bright Wrote: redsea wrote: I'm happy to see Bugzilla 2518(scope(success) not execuate and RAII variable destructor is not called) has been fixed, Great ! I have some questions when I

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread BCS
Reply to Brad, Restating in the form of a question... When would you _ever_ want {...} to not form a scope? static if(foo) { int i; float x; }

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Denis Koroskin
On Thu, 08 Jan 2009 07:22:53 +0300, BCS a...@pathlink.com wrote: Reply to Brad, Restating in the form of a question... When would you _ever_ want {...} to not form a scope? static if(foo) { int i; float x; } Yeah, and version(foo) belongs here, too.

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Bill Baxter
On Thu, Jan 8, 2009 at 1:27 PM, Denis Koroskin 2kor...@gmail.com wrote: On Thu, 08 Jan 2009 07:22:53 +0300, BCS a...@pathlink.com wrote: Reply to Brad, Restating in the form of a question... When would you _ever_ want {...} to not form a scope? static if(foo) { int i; float x; }

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Brad Roberts
BCS wrote: Reply to Brad, Restating in the form of a question... When would you _ever_ want {...} to not form a scope? static if(foo) { int i; float x; } That and the version one are good examples. However, the case example isn't. It actually already forms a scope, and

Re: DMD 1.039 and 2.023 releases

2009-01-07 Thread Walter Bright
Brad Roberts wrote: Jason House wrote: I don't think this answers their question. What curly braces mean after a label is clearly a design decision that you made when writing D. It seems that the choice is the opposite of what people expect. Can you explain why it should be NonScope?

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Bill Baxter
2009/1/7 Walter Bright newshou...@digitalmars.com: Faster long divides! No progress on faster long compiles though? --bb

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Jarrett Billingsley
On Tue, Jan 6, 2009 at 11:03 PM, Bill Baxter wbax...@gmail.com wrote: 2009/1/7 Walter Bright newshou...@digitalmars.com: Faster long divides! No progress on faster long compiles though? --bb The D2 changelog says that he undid the fix to 2500, which might be the cause. But no word on

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Denis Koroskin
On Wed, 07 Jan 2009 06:53:27 +0300, Walter Bright newshou...@digitalmars.com wrote: Faster long divides! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.039.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.023.zip Nice!

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Bill Baxter
On Wed, Jan 7, 2009 at 1:09 PM, Denis Koroskin 2kor...@gmail.com wrote: On Wed, 07 Jan 2009 06:53:27 +0300, Walter Bright newshou...@digitalmars.com wrote: Faster long divides! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.039.zip

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Denis Koroskin
On Wed, 07 Jan 2009 07:16:38 +0300, Denis Koroskin 2kor...@gmail.com wrote: On Wed, 07 Jan 2009 07:11:52 +0300, Bill Baxter wbax...@gmail.com wrote: On Wed, Jan 7, 2009 at 1:09 PM, Denis Koroskin 2kor...@gmail.com wrote: On Wed, 07 Jan 2009 06:53:27 +0300, Walter Bright

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Denis Koroskin
On Wed, 07 Jan 2009 07:11:52 +0300, Bill Baxter wbax...@gmail.com wrote: On Wed, Jan 7, 2009 at 1:09 PM, Denis Koroskin 2kor...@gmail.com wrote: On Wed, 07 Jan 2009 06:53:27 +0300, Walter Bright newshou...@digitalmars.com wrote: Faster long divides!

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Jarrett Billingsley
On Tue, Jan 6, 2009 at 11:51 PM, Walter Bright newshou...@digitalmars.com wrote: Jarrett Billingsley wrote: The D2 changelog says that he undid the fix to 2500, which might be the cause. But no word on whether it was the cause, or if D1 got the revert as well. D1 got the same reversion.

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Denis Koroskin
On Wed, 07 Jan 2009 07:03:27 +0300, Bill Baxter wbax...@gmail.com wrote: 2009/1/7 Walter Bright newshou...@digitalmars.com: Faster long divides! No progress on faster long compiles though? --bb Small statistics on compilation time of my small project: DMD2.021 - 16 seconds DMD2.022 - 46

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread bearophile
V 1.039 compiles my dlibs fine, but I have not timed the compilation times yet. The long divides are much faster than before and almost as the ones done by GCC, good work. The timings of the division benchmark I have shown last time: DMD1.038: 63.7 s DMD1.039: 12.2 s GCC4.2.1: 11.1 s

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Walter Bright
Denis Koroskin wrote: (and an Internal error: ..\ztc\cod4.c 357 on one of source code files) :) Bugzilla report, pls!

Re: DMD 1.039 and 2.023 releases

2009-01-06 Thread Bill Baxter
On Wed, Jan 7, 2009 at 2:10 PM, bearophile bearophileh...@lycos.com wrote: V 1.039 compiles my dlibs fine, but I have not timed the compilation times yet. The long divides are much faster than before and almost as the ones done by GCC, good work. The timings of the division benchmark I