dmd 1.048 and 2.033 releases

Steven Schveighoffer schveiguy at yahoo.com
Mon Oct 5 06:46:32 PDT 2009


On Mon, 05 Oct 2009 09:12:32 -0400, Denis Koroskin <2korden at gmail.com>  
wrote:

> On Mon, 05 Oct 2009 16:55:49 +0400, Jacob Carlborg <doob at me.com> wrote:
>
>> On 10/5/09 13:49, Steven Schveighoffer wrote:
>>> On Mon, 05 Oct 2009 03:54:22 -0400, Walter Bright
>>> <newshound1 at digitalmars.com> wrote:
>>>
>>>> Another OSX 10.5 release :-)
>>>>
>>>> Anyhow, this should work with gdb now, and has contract inheritance
>>>> (finally).
>>>>
>>>> http://www.digitalmars.com/d/1.0/changelog.html
>>>> http://ftp.digitalmars.com/dmd.1.048.zip
>>>>
>>>>
>>>> http://www.digitalmars.com/d/2.0/changelog.html
>>>> http://ftp.digitalmars.com/dmd.2.033.zip
>>>>
>>>> Many thanks to the numerous people who contributed to this update.
>>>
>>> Excellent work! It looks like a lot of mundane bugs are getting fixed,
>>> which is a good sign :)
>>>
>>> A couple questions:
>>>
>>> 1. "The result type of the typeid(type) is now the most derived  
>>> TypeInfo
>>> class, rather than the TypeInfo base class" Why can't this be  
>>> propogated
>>> to D1? I can't imagine code that depends on the return value being  
>>> typed
>>> as TypeInfo that would not simply just work with the most derived  
>>> return
>>> type...
>>>
>>> 2. A while ago, (I can't find the post, it may have been on reddit) you
>>> mentioned that you were going to add property notation. Is that still
>>> going to happen? I'm really looking forward to that, and if not, is
>>> there a reason?
>>
>> There are some traces of it in the code:  
>> http://www.dsource.org/projects/dmd/changeset/195 search for "property".
>>
>>> -Steve
>>
>
> int bar() @property
> {
>      return 42;
> }
>
> writeln(bar);
>
> Yay! :)

Cool :)

Unfortunately, this still compiles :(

int bar()
{
    return 42;
}

writeln("%d", bar);

And this too:

int bar() @property
{
   return 42;
}

writeln("%d", bar());

So it appears that @property is a noop for now, but is valid syntax.

Also interesting from this revelation is that attributes are coming :D

int bar() @blah
{
   return 42;
}

#../dmd-2.033/linux/bin/dmd -w testme.d
testme.d(8): valid attribute identifiers are property, not blah

-Steve


More information about the Digitalmars-d-announce mailing list