July 09, 2008
On Wed, 09 Jul 2008 15:45:16 +0000, Moritz Warning wrote:

> On Wed, 09 Jul 2008 18:53:24 +0400, Koroskin Denis wrote: [..]
>> No, it doesn't.
> 
> Ok, thanks. http://d.puremagic.com/issues/show_bug.cgi?id=2210

As Koroskin found out, it's a typeof(int) issue.
Bugzilla report was closed.
Tango got a nicer implementation that avoids this problem.
July 09, 2008
On Wed, 09 Jul 2008 16:56:52 +0000, Sean Kelly wrote:

> == Quote from Walter Bright (newshound1@digitalmars.com)'s article
>> Mostly bug fixing. http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.032.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.016.zip
> 
> I don't suppose there's any chance that bugzilla 288 could be fixed in 1.0 as well?  I know it's a breaking change from a code perspective, but it was clearly considered a bug in 1.0, and it makes maintaining cross-compatible code between 1.0 and 2.0 difficult at best.
> 
> 
> Sean

I see it as a plus. To leave this issue behind once for all.

Sure, it's a breaking change (most bugs are).
In perspective of the breaking changes we had already,
I would welcome this change.

my2cents
July 09, 2008
Reply to Walter,

> Lars Ivar Igesund wrote:
> 
>> I agree that there is no particular need to upgrade, although new DMD
>> releases tend to have bugfixes that are important to Tango users.
>> Furthermore, D users expect any D 1.0 library to work with the next
>> DMD 1.0xx compiler release, it is a stable branch after all. When
>> this does not happen, i.e the compiler has a breaking change, there
>> is some furious work at our end to figure out what the heck is wrong,
>> with potentially quite a few requests and pings from the users (I
>> speak from experience).
>> 
> I apologize for that.
> 

If you could test dmd with tango from a single shell script (runs SVN up; some tests; etc) would you add that to the pre release tests?


July 09, 2008
Walter Bright wrote:
> Sean Kelly wrote:
>> While it's invalid to return a static array from a function, it does seem like
>> this could have undesired consequences:
>>
>>     T fn(T)( T val ) { return val; }
>>
>> Shouldn't the above be valid for all types?
> 
> Yes, but returning static arrays is not allowed.

So if I do this:

    int[3] x;
    fn( x );

I should expect to get a compile error?
July 09, 2008
Walter Bright wrote:
> Sean Kelly wrote:
>> I don't suppose there's any chance that bugzilla 288 could be fixed
>> in 1.0 as well?  I know it's a breaking change from a code perspective,
>> but it was clearly considered a bug in 1.0, and it makes maintaining
>> cross-compatible code between 1.0 and 2.0 difficult at best.
> 
> The problem is it's a breaking change.

But it's a breaking change that people asked for two years ago, before D 2.0 was announced.  Besides, breaking changes are made to D 1.0 all the time anyway, as evidenced by the fact that all of the past 4 DMD 1.x releases have broken Tango in one way or another.  I grant that, as a silent breaking change this is somewhat of a bigger deal, but I suspect that our users would gladly change their code to have this in 1.0.


Sean
July 09, 2008
BCS wrote:
> If you could test dmd with tango from a single shell script (runs SVN up; some tests; etc) would you add that to the pre release tests?

The problem with that is if it fails, then I will be debugging Tango (and every other project). It's not practical.
July 09, 2008
Walter Bright:
> bearophile wrote:
> > At a first test, it seems the compiled executables are 2-3+ times bigger than the ones produced by 1.029.
> 
> Hmm, haven't noticed that.

Here are some exact results:

V. 1.029:
libs:     951_324 bytes (with unittests)
test.d:   118_300 bytes

V. 1.032:
libs:   1_386_012 bytes (with unittests)
test.d:   277_020 bytes

Where the libs are my ones, and the test.d is just:

import std.stdio: put = writef, putr = writefln;
import std.string: join;
void main() {
    putr(["ab", "cde"].join(""));
}

I'd like to know if someone else can confirm this inflation.

Bye,
bearophile
July 09, 2008
Sean Kelly wrote:
> But it's a breaking change that people asked for two years ago, before D 2.0 was announced.  Besides, breaking changes are made to D 1.0 all the time anyway, as evidenced by the fact that all of the past 4 DMD 1.x releases have broken Tango in one way or another.  I grant that, as a silent breaking change this is somewhat of a bigger deal, but I suspect that our users would gladly change their code to have this in 1.0.

Creating a spec-changing breaking change for D 1.0 is not its charter, which is to be a stable release of D that is not getting breaking spec changes.
July 09, 2008
Sean Kelly wrote:
> So if I do this:
> 
>     int[3] x;
>     fn( x );
> 
> I should expect to get a compile error?

If fn returns a static array, yes.
July 09, 2008
"Walter Bright" wrote
> BCS wrote:
>> If you could test dmd with tango from a single shell script (runs SVN up; some tests; etc) would you add that to the pre release tests?
>
> The problem with that is if it fails, then I will be debugging Tango (and every other project). It's not practical.

No, Tango devs will be debugging it.  Hell, let them do the work with a pre-release compiler.  I'll volunteer to do it.  If they determine it is a DMD bug, they give you a minimal case, and then you go back and fix it, or you determine that it can't be fixed for this release (with appropriate bugzilla entry logged).

But without access to the compiler pre-release, there is not much the Tango guys can do except say "another stable release that is broken"

And all this is moot if we can build dmd from source :)  It would be nice to be able to help...

-Steve