[dmd-internals] Type mangling for deduced attributes

kenji hara k.hara.pg at gmail.com
Wed Nov 16 02:24:23 PST 2011


2011/11/16 Walter Bright <walter at digitalmars.com>:
>
> 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.

Thanks for your explanations.
OK, It is reasonable.

Because of it, there is an issue caused by fixing 6902 with my patch.
I'll post a pull to fix it.

kenji Hara


More information about the dmd-internals mailing list