suggestion of implicit new
Craig Black
cblack at ara.com
Wed May 31 21:10:58 PDT 2006
"Tom S" <h3r3tic at remove.mat.uni.torun.pl> wrote in message
news:e5l5o1$1foc$1 at digitaldaemon.com...
> shinichiro.h wrote:
>> Hi all,
>>
>> I guess D syntax can allow implicit new expression like following:
>>
>> class C {
>> this() {}
>> this(int x) {}
>> }
>> void func() {
>> C c = C(); // not new C()
>> c = C(3); // not new C(3)
>> }
>>
>> I think the syntax is cute. And the syntax is not ambiguous and does
>> not make DMD slower. I have succeeded to implement the syntax into
>
> Well, it is ambiguous if the class contains a static opCall, but then
> again, I'd suggest that syntax instead of the current 'auto' storage
> modifier.
I'll second that. It seems like the nicest proposal so far to eliminate the
multiple meanings of "auto".
-Craig
More information about the Digitalmars-d
mailing list