First D project, problem with error messages

Steven Schveighoffer schveiguy at gmail.com
Sat Feb 11 16:03:11 UTC 2023


On 2/11/23 12:28 AM, Walter Bright wrote:
> On 2/9/2023 11:42 AM, Steven Schveighoffer wrote:
>> Having no parameters has limited use, mostly to allow it to be a mixin 
>> template, or to prevent it from being included in the binary unless 
>> it's used.
> 
> Adding () to functions turns them into templates, which can be be 
> advantageous if you want the compiler to infer the return/scope 
> attributes automatically.
> 

Yes, there are some advantages for functions, because functions don't 
require explicit instantiation.

-Steve


More information about the Digitalmars-d mailing list