December 05, 2009
Walter Bright wrote:
> Probably the biggest thing is opDispatch!
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.053.zip
> 
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.037.zip
> 
> Many thanks to the numerous people who contributed to this update.

Can someone explain this "new feature" please ?!

"Added support for op= for array.length"

array.length = X; cannot be meant...
December 05, 2009
Walter Bright wrote:
> Probably the biggest thing is opDispatch!
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.053.zip
> 
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.037.zip
> 
> Many thanks to the numerous people who contributed to this update.

I just noticed: I don't see @property in the changelog anywhere, but it's now in the spec. @safe, @trusted, @system aren't there either.
December 05, 2009
Extrawurst wrote:
> Walter Bright wrote:
>> Probably the biggest thing is opDispatch!
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.053.zip
>>
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.037.zip
>>
>> Many thanks to the numerous people who contributed to this update.
> 
> Can someone explain this "new feature" please ?!
> 
> "Added support for op= for array.length"
> 
> array.length = X; cannot be meant...

  int [] x = new int[30];
  x.length += 5;
December 05, 2009
There's a large number of changes!
I don't understand what "No more comma operators allowed between [ ]." means.

I have tried the D2 compiler a little with this code:

import std.stdio: writeln;
import std.math: pow;

struct S1 { int x; }

void main() {
    struct S2 { int x; }
    static struct S3 { int x; }
    writeln(S1.sizeof, " ", S2.sizeof, " ", S3.sizeof); // 4 4 4

    auto a = [1, 2, 3];
    writeln(a); // 1 2 3
    a.length++;

    //writeln(5 ^^ 2);
    writeln(5.2 ^^ 2); // errors
}

S2 seems to not have the hidden field, The sizeof is the same for all three structs.

a.length++ seems to not work yet.

writeln(a); prints stupidly items separated by a space. A MUCH better print is:
[1, 2, 3]

5 ^^ 2 doesn't work yet, I guess it's not implemented yet.
But what do I have to import from math to use 5.2 ^^ 2 ?
Anyway, the need to explicitly import something to use a built-in operator like ^^ looks like a bad idea.

Bye and thank you,
bearophile
December 05, 2009
"bearophile" <bearophileHUGS@lycos.com> wrote in message news:hfdt87$1num$1@digitalmars.com...
> There's a large number of changes!
> I don't understand what "No more comma operators allowed between [ ]."
> means.
>

I assume that means:

int[1,2,3] foo; // <- formerly created an int[3], now (presumably) disallowed


December 05, 2009
Nick Sabalausky:
> I assume that means:
> 
> int[1,2,3] foo; // <- formerly created an int[3], now (presumably) disallowed

Yes, you are right, that's probably it, thank you.

Bye,
bearophile
December 05, 2009
On Sat, 5 Dec 2009 10:19:23 -0500, "Nick Sabalausky" <a@a.a> wrote:

>"bearophile" <bearophileHUGS@lycos.com> wrote in message news:hfdt87$1num$1@digitalmars.com...
>> There's a large number of changes!
>> I don't understand what "No more comma operators allowed between [ ]."
>> means.
>>
>
>I assume that means:
>
>int[1,2,3] foo; // <- formerly created an int[3], now (presumably) disallowed
>

Was this feature documented anywhere?
December 05, 2009
"Max Samukha" <spambox@d-coding.com> wrote in message news:pkvkh5tvvhie0ga61lrpp5qmt53h5ju1t4@4ax.com...
> On Sat, 5 Dec 2009 10:19:23 -0500, "Nick Sabalausky" <a@a.a> wrote:
>
>>"bearophile" <bearophileHUGS@lycos.com> wrote in message news:hfdt87$1num$1@digitalmars.com...
>>> There's a large number of changes!
>>> I don't understand what "No more comma operators allowed between [ ]."
>>> means.
>>>
>>
>>I assume that means:
>>
>>int[1,2,3] foo; // <- formerly created an int[3], now (presumably)
>>disallowed
>>
>
> Was this feature documented anywhere?

I don't think it was ever really a feature, it was just a consequence of the next-to-useless expression "x,y" evaluating to "y" and "int[...] foo;" taking a single value for "...".


December 05, 2009
bearophile wrote:
> 5 ^^ 2 doesn't work yet, I guess it's not implemented yet.
> But what do I have to import from math to use 5.2 ^^ 2 ?
> Anyway, the need to explicitly import something to use a built-in operator like ^^ looks like a bad idea.

A very bad idea indeed! The idea is to save keystrokes...

Can't "import std.math : pow;" be added to the current module when this is needed?
December 05, 2009
Walter Bright, el  4 de diciembre a las 20:05 me escribiste:
> Probably the biggest thing is opDispatch!
> 
> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.053.zip
> 
> 
> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.037.zip
> 
> Many thanks to the numerous people who contributed to this update.

Great! Can you tag the new releases? (and maybe the old ones too ;)

This should be enough:
svn cp http://svn.dsource.org/projects/dmd/branches/dmd-1.x http://svn.dsource.org/projects/dmd/tags/dmd-1.053
svn cp http://svn.dsource.org/projects/dmd/trunk http://svn.dsource.org/projects/dmd/tags/dmd-2.037

The same should be done in the phobos and druntime repositories.

Thanks!

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Cuando le dije si querĂ­a bailar conmigo
Se puso a hablar de Jung, de Freud y Lacan
Mi idiosincracia le causaba mucha gracia
Me dijo al girar la cumbiera intelectual