[dmd-internals] Type mangling for deduced attributes

Walter Bright walter at digitalmars.com
Wed Nov 16 01:18:50 PST 2011



On 11/16/2011 12:31 AM, Don Clugston wrote:
>
> That's intentional. If it is only *deduced* to be pure/nothrow/safe,
> then external functions, which don't have access to the source, can
> NOT rely on it being pure/nothrow/safe. I think this is the right
> choice.
> Suppose I want to declare a stub function. At the moment, because it's
> just a stub, it isn't impure or unsafe, but I know that when it is
> fully implemented, it will be impure and unsafe, and may throw.
> The deduction should not be giving additional guarantees to external
> code. It should be conservative.

I think Don's reasoning is sound.


More information about the dmd-internals mailing list