digitalmars.D.announce - dmd 1.058 and 2.043 release
- Walter Bright (5/5) Apr 08 2010 http://www.digitalmars.com/d/1.0/changelog.html
- bearophile (9/9) Apr 09 2010 Thank you for the release and your work, and thank you to Don for all th...
- biozic (8/17) Apr 09 2010 Maybe this is the same problem as with:
- Lars T. Kyllingstad (3/14) Apr 09 2010 Could this have anything to do with BigInt not having a toHash() functio...
- bearophile (15/15) Apr 09 2010 Now I have tested this release a little better, it seems to work well. I...
- Walter Bright (3/8) Apr 09 2010 The error is not a mismatched file name, which is perfectly legitimate i...
- bearophile (10/12) Apr 09 2010 Do you mean that in D it is OK to have a file named "foo.d" with inside ...
- Walter Bright (3/13) Apr 09 2010 The flexibility comes in handy now and then.
- BCS (4/22) Apr 09 2010 For example, having foo_linux.d and foo_win.d both claiming to be foo.
- bearophile (5/6) Apr 09 2010 OK.
- Robert Clipsham (9/15) Apr 09 2010 No need for a huge module, or module names mismatching file names:
- BCS (14/22) Apr 09 2010 I don't think that works in one case; where you are forced to use fully ...
- bearophile (4/6) Apr 09 2010 You can probably use a "public import".
- BCS (5/12) Apr 09 2010 IIRC, all that does is make anything that imports you, import that as we...
- bearophile (8/10) Apr 09 2010 I meant to create a module named "foo" with inside:
- BCS (13/27) Apr 09 2010 That's exactly what I thought you were suggesting.
- bearophile (10/11) Apr 09 2010 OK, I have never felt the need of such extra flexibility in my D program...
- dennis luehring (2/4) Apr 10 2010 but isn't that an abstract form of hijacking then?
- Don (7/10) Apr 09 2010 Please don't clutter the announce newsgroup with bug reports.
- Walter Bright (2/8) Apr 09 2010 Don's right. But it is ok to reply with a link to a bugzilla report.
http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.058.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.043.zip Thanks to the many people who contributed to this update!
Apr 08 2010
Thank you for the release and your work, and thank you to Don for all the bug fixes. I will need some more time to test this release better. In the meantime, is it possible to use BigInts into an AA? This gives a Range violation: import std.bigint: BigInt; void main() { BigInt[BigInt] aa; aa[BigInt(1)]++; } Bye, bearophile
Apr 09 2010
Le 09/04/10 13:35, bearophile a écrit :Thank you for the release and your work, and thank you to Don for all the bug fixes. I will need some more time to test this release better. In the meantime, is it possible to use BigInts into an AA? This gives a Range violation: import std.bigint: BigInt; void main() { BigInt[BigInt] aa; aa[BigInt(1)]++; } Bye, bearophileMaybe this is the same problem as with: import std.variant; void main() { Variant[string] aa; aa["one"] = 1; } Bug 2451?
Apr 09 2010
bearophile wrote:Thank you for the release and your work, and thank you to Don for all the bug fixes. I will need some more time to test this release better. In the meantime, is it possible to use BigInts into an AA? This gives a Range violation: import std.bigint: BigInt; void main() { BigInt[BigInt] aa; aa[BigInt(1)]++; } Bye, bearophileCould this have anything to do with BigInt not having a toHash() function? -Lars
Apr 09 2010
Now I have tested this release a little better, it seems to work well. I have to say two things: 1) The bug 3911 was a mix of two different bugs, Don has fixed one of them, so I have closed the bug 3911 and I have opened a new cleaned bug report, number 4075: http://d.puremagic.com/issues/show_bug.cgi?id=3911 http://d.puremagic.com/issues/show_bug.cgi?id=4075 Because this code generates an error still: auto foo() { return 0; } enum int _ = foo(); void main() {} 2) Bug 3972 is not fixed, it's open still. The error message produced is not good yet. I have added a comment at the bottom: http://d.puremagic.com/issues/show_bug.cgi?id=3972 In the situation I've shown in 3972 a better error message is the two error messages (or something similar): spam.d(2): Error: module 'test' has mismatched file name 'spam.d'. foo.d(2): Error: module 'bar' has mismatched file name 'foo.d'. Bye, bearophile
Apr 09 2010
bearophile wrote:In the situation I've shown in 3972 a better error message is the two error messages (or something similar): spam.d(2): Error: module 'test' has mismatched file name 'spam.d'. foo.d(2): Error: module 'bar' has mismatched file name 'foo.d'.The error is not a mismatched file name, which is perfectly legitimate in D. The error is two different files have the same module name.
Apr 09 2010
Walter Bright: Thank you for your answer.The error is not a mismatched file name, which is perfectly legitimate in D.Do you mean that in D it is OK to have a file named "foo.d" with inside it at the top written "module bar;" ? What's the rationale behind this? (I don't like this).The error is two different files have the same module name.<Maybe I am missing something, but: - there is a module "bar" in the file named "foo.d" - and there is the module "test" in the file named "spam.d". All four names are distinct, there are no name duplication (and the imports can't change this basic fact). Bye, bearophile
Apr 09 2010
bearophile wrote:Walter Bright: Thank you for your answer.Yes.The error is not a mismatched file name, which is perfectly legitimate in D.Do you mean that in D it is OK to have a file named "foo.d" with inside it at the top written "module bar;" ?What's the rationale behind this? (I don't like this).The flexibility comes in handy now and then.
Apr 09 2010
Hello Walter,bearophile wrote:For example, having foo_linux.d and foo_win.d both claiming to be foo. -- ... <IXOYE><Walter Bright: Thank you for your answer.Yes.The error is not a mismatched file name, which is perfectly legitimate in D.Do you mean that in D it is OK to have a file named "foo.d" with inside it at the top written "module bar;" ?What's the rationale behind this? (I don't like this).The flexibility comes in handy now and then.
Apr 09 2010
BCS:For example, having foo_linux.d and foo_win.d both claiming to be foo.OK. And I presume you don't want to use a single module with a mega version(linux) {...} else {...} inside. Thank you, bearophile
Apr 09 2010
On 09/04/10 23:11, bearophile wrote:BCS:No need for a huge module, or module names mismatching file names: ---- module foo; version (linux) import foo_linux; version (Windows) import foo_linux; ---- Sure it adds and extra file, it's a lot cleaner imo than having a huge module with both implementations or mismatching file/module names.For example, having foo_linux.d and foo_win.d both claiming to be foo.OK. And I presume you don't want to use a single module with a mega version(linux) {...} else {...} inside. Thank you, bearophile
Apr 09 2010
Hello Robert,No need for a huge module, or module names mismatching file names: ---- module foo; version (linux) import foo_linux; version (Windows) import foo_win; ---- Sure it adds and extra file, it's a lot cleaner imo than having a huge module with both implementations or mismatching file/module names.I don't think that works in one case; where you are forced to use fully qualified name. import foo; import something.else; bar(); // calls something.else.bar; foo.bar(); // IIRC this don't work OTOH, you might be able to get around that with the following: version (linux) { import foo_linux; alias foo_linux foo; } version (Windows) { import foo_win; alias foo_win foo; } (I haven't tested any of that because my systems are being shipped right now.) -- ... <IXOYE><
Apr 09 2010
BCS:I don't think that works in one case; where you are forced to use fully qualified name.You can probably use a "public import". Bye, bearophile
Apr 09 2010
Hello bearophile,BCS:IIRC, all that does is make anything that imports you, import that as well. It doesn't do anything to the names. -- ... <IXOYE><I don't think that works in one case; where you are forced to use fully qualified name.You can probably use a "public import".
Apr 09 2010
BCS:IIRC, all that does is make anything that imports you, import that as well. It doesn't do anything to the names.I meant to create a module named "foo" with inside: module foo; version (linux) public import foo_linux; version (Windows) public import foo_win; The module system has numerous holes (that Walter will need to take a look at, because three of them alone cover almost 10% of all bugzilla votes), so this is not going to work perfectly, but now if you import foo you have available all the names inside foo_linux and foo_win. Bye, bearophile
Apr 09 2010
Hello bearophile,BCS:That's exactly what I thought you were suggesting. The problem is that, IIRC and assuming foo_linux and foo_win both contain a bar, the the following still doesn't work: foo.bar(); what works is: foo_linux.bar(); or foo_win.bar(); In the case that just bar() doesn't work (say there is another bar somewhere else), you're sunk. -- ... <IXOYE><IIRC, all that does is make anything that imports you, import that as well. It doesn't do anything to the names.I meant to create a module named "foo" with inside: module foo; version (linux) public import foo_linux; version (Windows) public import foo_win; The module system has numerous holes (that Walter will need to take a look at, because three of them alone cover almost 10% of all bugzilla votes), so this is not going to work perfectly, but now if you import foo you have available all the names inside foo_linux and foo_win.
Apr 09 2010
Walter Bright:The flexibility comes in handy now and then.OK, I have never felt the need of such extra flexibility in my D programs, so I trust your judgement. Every time a a semantic hole is left in a language (and this is a little hole), you have to pay a price, in terms for example of: - less easy to understand error messages (the currently generated error message is not easy to understand and I think it's wrong, because in that program the four names are distinct, there is no duplication); - less simplicity for the D newbies to learn the language, because to learn something faster you need a strict teacher; - possible bugs caused by side effects of the semantic hole (because semantic holes often create semantic loopholes). In Delphi the "main unit" of a program is denoted with for example, at the top: program Project1; Bye, bearophile
Apr 09 2010
but isn't that an abstract form of hijacking then? or an sideeffect smelling like that?What's the rationale behind this? (I don't like this).The flexibility comes in handy now and then.
Apr 10 2010
bearophile wrote:Now I have tested this release a little better, it seems to work well. I have to say two things: 1) The bug 3911 was a mix of two different bugs, Don has fixed one of them, so I have closed the bug 3911 and I have opened a new cleaned bug report, number 4075:Please don't clutter the announce newsgroup with bug reports. And in general, do NOT put multiple bugs in one report. In particular, it's worth saying this to everyone: if something causes a compiler segfault or an internal compiler error, ALWAYS put it in its own report. In > 95% of cases it's a different bug, even if it looks the same as something else.
Apr 09 2010
Don wrote:Please don't clutter the announce newsgroup with bug reports. And in general, do NOT put multiple bugs in one report. In particular, it's worth saying this to everyone: if something causes a compiler segfault or an internal compiler error, ALWAYS put it in its own report. In > 95% of cases it's a different bug, even if it looks the same as something else.Don's right. But it is ok to reply with a link to a bugzilla report.
Apr 09 2010