Re: dmd 1.056 and 2.040 release
On Jan 30, 10 15:13, Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Is the changelog page broken? On the 2.0 changelog it starts with $(D_S D Change Log,, and without a navigation bar.
Re: dmd 1.056 and 2.040 release
This release makes me smile. Thank you so much Walter, and everybody who contributed too.
Re: dmd 1.056 and 2.040 release
On 30.01.2010 09:32, KennyTM~ wrote: On Jan 30, 10 15:13, Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Is the changelog page broken? On the 2.0 changelog it starts with $(D_S D Change Log,, and without a navigation bar. And 1.056 is missing, only its changelog is present, but under the 1.055 header.
Re: dmd 1.056 and 2.040 release
Regarding this: Bugzilla 3556: version(CTFE) I have written the following little D2 program: import std.stdio: printf; static if (__ctfe) { int foo() { return 1; } } else { int foo() { return 2; } } enum int x1 = foo(); void main() { int x2 = foo(); printf(%d %d\n, x1, x2); } But it doesn't work, I don't understand why. (Isn't the usage of __ctfe normally done at compile time? Otherwise this feature introduces another very special case in the language). Can you tell me the purpose of the following 3 changes? ModuleInfo changed from class to struct added static/final function implementations to interfaces http://dsource.org/projects/dmd/changeset/339 Thank you, bye, bearophile
Re: dmd 1.056 and 2.040 release
On 1/30/10 08:13, Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Very nice. What happened to the change log for 1.055? Why can't we get version(CTFE) in D1 also?
Re: dmd 1.056 and 2.040 release
Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Very nice! Each release kills a lot of bugs and adds small but very powerful features. About the interface functions, this compiles: -- import std.stdio; interface One { final void foo() { writefln(One); } } interface Two { final void foo() { writefln(Two); } } class X : One, Two { } class Y : Two, One { } void main() { X x = new X(); x.foo(); // prints One Y y = new Y(); y.foo(); // prints Two } -- Is this intended behaviour? Might leads to obscure bugs...
Re: dmd 1.056 and 2.040 release
Walter Bright Wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Looks like this doesn't work anymore with this release (D2): --- module Foo; import core.runtime; import std.c.windows.windows; class Bar {} extern(Windows) int WinMain(HINSTANCE instance, HINSTANCE, LPSTR cmdLine, int cmdShow ) { void exceptionHandler(Throwable e) { throw e; } Runtime.initialize( exceptionHandler ); auto foo = new Foo(); Runtime.terminate ( exceptionHandler ); return 0; } --- When I run the program it segfaults with the following message (when I debug it): Unhandled Exception: EXCEPTION_ACCESS VIOLATION(0xc05) at object._moduleCtor2.ModuleInfo The exception is thrown from the runtime initializer. It used to work with the previous DMD version (2.039). I think that the change of ModuleInfo from class to struct somehow affected this (just speculating). I did a wrapper for the Windows API and now none of my programs run when I use DMD 2.040. Damn, I was excited by the new @disable attribute. :(
Re: dmd 1.056 and 2.040 release
On Sat, 30 Jan 2010 10:56:28 -0500, Ary Borenszweig a...@esperanto.org.ar wrote: Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Very nice! Each release kills a lot of bugs and adds small but very powerful features. About the interface functions, this compiles: -- import std.stdio; interface One { final void foo() { writefln(One); } } interface Two { final void foo() { writefln(Two); } } class X : One, Two { } class Y : Two, One { } void main() { X x = new X(); x.foo(); // prints One Y y = new Y(); y.foo(); // prints Two } -- Is this intended behaviour? Might leads to obscure bugs... This looks like a form of function hijacking, so it should be a accepts-invalid bug.
Re: dmd 1.056 and 2.040 release
Ary Borenszweig wrote: Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Very nice! Each release kills a lot of bugs and adds small but very powerful features. About the interface functions, this compiles: -- import std.stdio; interface One { final void foo() { writefln(One); } } interface Two { final void foo() { writefln(Two); } } class X : One, Two { } class Y : Two, One { } void main() { X x = new X(); x.foo(); // prints One Y y = new Y(); y.foo(); // prints Two } -- Is this intended behaviour? Might leads to obscure bugs... I think this should lead to a compile-time error. Andrei
Re: dmd 1.056 and 2.040 release
bearophile wrote: Can you tell me the purpose of the following 3 changes? ModuleInfo changed from class to struct Eliminate unnecessary dependencies on Object's vtbl[] added static/final function implementations to interfaces Support NVI (Non Virtual Inheritance) idiom.
Re: dmd 1.056 and 2.040 release
Yao G wrote: The exception is thrown from the runtime initializer. It used to work with the previous DMD version (2.039). I think that the change of ModuleInfo from class to struct somehow affected this (just speculating). Make sure you recompile everything, or you'll get crashes.
Re: dmd 1.056 and 2.040 release
$ dmd Digital Mars D Compiler v2.040 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Interestingly, copyright date is still 2009. Is this a bug or a feature? -- Michel Fortin michel.for...@michelf.com http://michelf.com/
Re: dmd 1.056 and 2.040 release
Michel Fortin wrote: $ dmd Digital Mars D Compiler v2.040 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Interestingly, copyright date is still 2009. Is this a bug or a feature? It takes a while for me to get all the years changed.
Re: dmd 1.056 and 2.040 release
On 1/30/10 14:24, grauzone wrote: Jacob Carlborg wrote: On 1/30/10 08:13, Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Very nice. What happened to the change log for 1.055? Why can't we get version(CTFE) in D1 also? You can ask this question for all other D2 features backwards compatible to D1 too. Why isn't __traits in D1? Why can't D1 have thread local variables (I'm not talking about TLS-by-default here)? Because D1 has already got at least two new version identifier since it became feature freeze. But I see now that it's actually not a version identifier, it's a global bool.
Re: dmd 1.056 and 2.040 release
Walter Bright Wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Do you ever find new bugs while fixing other?
Re: dmd 1.056 and 2.040 release
Walter Bright newshou...@digitalmars.com wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! D2 changelog points @disable to attribute.html#deprecated, should be attribute.html#disable -- Simen
Re: dmd 1.056 and 2.040 release
On 2010-01-30 02:13:48 -0500, Walter Bright newshou...@digitalmars.com said: http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip It's great to have TLS working on Mac OS X. But it looks like it suffers from the same linking problem as the module info section. I've added some useful observations to bugzilla that might help fix the issue in case you want to revisit it: http://d.puremagic.com/issues/show_bug.cgi?id=3453 -- Michel Fortin michel.for...@michelf.com http://michelf.com/