Fully dynamic d by opDotExp overloading

Danny Wilson bluezenix at gmail.com
Sat Apr 18 03:11:54 PDT 2009


Op Sat, 18 Apr 2009 09:24:39 +0200 schreef Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org>:

>>  now you have an easy way to know if a type is dynamic without changing  
>> the method invocation syntax. A proper IDE can easily mark those Types  
>> as different, for example, using a different color.
>
> The dynamic behavior is indicated by the use of opDotExp. The redundancy  
> of the two notations doesn't quite sit well.
>
> Andrei

Not necessarily.

dynamic class A {
  void opDotExp... // compiles
}

class A {
  void opDotExp... // error
}

class A {
  void nothrow opDotExp... // compiles
}


But yea its still redundant ofcourse. The 'proper' IDE could color classes  
which have an opDotExp (thats allowed to throw) differently just aswell.



More information about the Digitalmars-d mailing list