dmd 1.042 and 2.027 releases

Max Samukha samukha at voliacable.com.removethis
Wed Apr 1 05:16:28 PDT 2009


On Wed, 01 Apr 2009 17:03:01 +0800, davidl <davidl at 126.com> wrote:

>? Wed, 01 Apr 2009 16:43:57 +0800?Max Samukha  
><samukha at voliacable.com.removethis> ??:
>
>> On Tue, 31 Mar 2009 22:21:59 -0700, Walter Bright
>> <newshound1 at digitalmars.com> wrote:
>>
>>> The large volume of bug fixes is because a lot of people contributed
>>> patches. Thanks!
>>>
>>> http://www.digitalmars.com/d/1.0/changelog.html
>>> http://ftp.digitalmars.com/dmd.1.042.zip
>>>
>>>
>>> http://www.digitalmars.com/d/2.0/changelog.html
>>> http://ftp.digitalmars.com/dmd.2.027.zip
>>
>> Great! Does it mean opDot is deprecated?
>
>why not make opDot some compile time stuff?
>
>class V
>{
>     opDot(char[] method, ...)
>     {
>         // runtime lib to figure what the method is, and then call it with  
>vararg!
>     }
>}
>
>this can be particular useful for COM
>
>consider:
>
>UnknownComponent.itsparticularMethod(34,"adf"); <-- bind every com  
>component is troublesome and waste time.
>The runtime can use typelib info to give us something useful
>
>Also this can help DDL to be further more useful.
>
>I don't need to bind my plugin.
>I just directly call myplugin.mymethod("asdf");
>The opdot will eventually resolve the mymethod in the plugin, then call it!
>I will really enjoy to see this happen.

The name is known at compile time, so it probably should be

opDot(string member)(...)
{
}

or even an arbitrary template named opDot that the compiler would try
to instantiate with the name as first parameter, for example:

c.foo!(whatever)(v);

would be rewritten as

c.opDot!("foo", whatever)(v);





More information about the Digitalmars-d-announce mailing list