dip1000 and preview in combine to cause extra safety errors

Walter Bright newshound2 at digitalmars.com
Tue Jun 14 23:41:55 UTC 2022


On 6/13/2022 6:32 PM, Adam D Ruppe wrote:
> On Monday, 13 June 2022 at 22:56:11 UTC, Walter Bright wrote:
>> The D compiler *does* keep track of this when it does attribute inference. 
>> Attribute inference is not currently done for regular functions because of the 
>> risk of mismatch between a function declaration and a function definition that 
>> may arise because of inference.
> 
> It'd cause a linker error though, right? This isn't really much different than 
> any other mismatched header - and since we have dmd -H, it seems manageable.
> 
> I'll write a blog about this when I have time though. Been swamped with work 
> lately but I do think there's some cases we have to be careful of but it should 
> be doable.

Even with a linker error there'd be constant maintenance problem for the user.


More information about the Digitalmars-d mailing list