[dmd-beta] dmd 2.064 beta take 2

Jonathan M Davis jmdavisProg at gmx.com
Wed May 15 14:51:35 PDT 2013


On Wednesday, May 15, 2013 22:33:45 Leandro Lucarella wrote:
> I think it make more sense to put the default in the constructor
> argument instead of in the member variable declaration. In that case is
> pretty clear, but if the member declaration is far from the constructor,
> one could easily assume scalingFactor is always 1.0.

Except that structs don't have default constructors, so if you're dealing with 
the init value, you're going to have to directly initialize the member. There 
_are_ plenty of cases though where using a default argument would make good 
sense. It just doesn't help the init value any.

- Jonathan M Davis


More information about the dmd-beta mailing list