Is DMD 0.166 RC 1.0?

Kristian kjkilpi at gmail.com
Mon Sep 4 05:29:29 PDT 2006


On Mon, 04 Sep 2006 14:32:54 +0300, Ivan Senji  
<ivan.senji_REMOVE_ at _THIS__gmail.com> wrote:

> Walter Bright wrote:
>> Any compelling reason why not? I know that everyone (including me)  
>> wants more features, more improvements, etc., but nothing about calling  
>> it 1.0 will prevent that from happening.
>
> Maybe not the right time to mention it but: one of the most annoying  
> error messages dmd produces is "is not an lvalue". An annoying message  
> isn't doesn't make a good first impression, and it makes an even worse  
> second or third impression.
>
> Example:
>
>    class A
>    {
>      int xx = 11;
>      int opIndex(int pos){return xx;}
>      int opIndexAssign(int what, int pos){return xx = what;}
>
>      int prop(){return xx;}
>      int prop(int newxx){return xx = newxx;}
>    }
>
>    auto a = new A;
>
>    void f(inout int x)
>    {
>      x ++;
>    }
>
>    f(a[5]);    //((a).opIndex)(5) is not an lvalue
>    f(a.prop);  //((a).prop)() is not an lvalue
>
> Maybe a[5] isn't strictly an lvalue because it's adress can't be taken  
> but, it would make much sense for the compiler to translate those cases  
> to (and shouldn't be that hard to do):
>
> auto x = a[5];
>    f(x);
> a[5] = x;
>
> auto y = a.prop;
>    f(y);
> a.prop = y;
>
> I don't want to sound lika a D-hater because of my recent (complaining)  
> posts but just trying to show that although D is a fantastic language it  
> is still a little too rough around the edges.

Special, cool features are fine when making a good first expression. But  
basic stuff is the most important part of a language, IMHO. That's because  
you do basic stuff a lot. If something annoys you a little constantly,  
it'll annoy you a lot after a while.

(This is too harsh of an example, but if a cake looks delicious you may  
buy it, but if it doesn't taste good, you won't buy it again.)



More information about the Digitalmars-d-announce mailing list