[dmd-beta] dmd 2.064 beta take 2

Andrei Alexandrescu andrei at erdani.com
Wed May 15 12:07:13 PDT 2013


On 5/15/13 3:02 PM, Walter Bright wrote:
> I believe it was disallowed in earlier D2 versions. If I saw such code
> in a project, I'd find it awfully suspect, not sensible.

On the contrary, examples abound. Consider:

class Image {
     const double scalingFactor = 1.0; // no scaling
     this(double sf) {
         scalingFactor = sf;
         ...
     }
     ...
}

What is suspect about this? I have about five others without even 
needing to think that hard.


Andrei


More information about the dmd-beta mailing list