Program size, linking matter, and static this()

Jakob Ovrum jakobovrum at gmail.com
Sun Dec 18 01:29:51 PST 2011


On Sunday, 18 December 2011 at 09:26:58 UTC, Jakob Ovrum wrote:
> On Sunday, 18 December 2011 at 08:56:56 UTC, so wrote:
>> You have to expose either way no? "A.make" instead of "makeA"
>
> Yeah, in most sane code, I would imagine so. But still, the 
> original example was just `make` version `A.make`. They could 
> both obscure their return type through various means (like 
> auto), but imo it makes less sense to do so for the static 
> member function - I would be surprised to call `A.make` and not 
> get a value of type `A`. But it would only be a tiny 
> improvement and I don't think it's really relevant to the 
> singleton pattern.

Sorry, I'm wrong, that wasn't the case at all. The original 
example was indeed `A.make` versus `makeB`.


More information about the Digitalmars-d mailing list