[dmd-internals] Type mangling for deduced attributes

Steve Schveighoffer schveiguy at yahoo.com
Wed Nov 16 06:35:45 PST 2011


Take this argument with a grain of salt, I have very little internal dmd knowledge.  But...

Isn't deduction of pure/nothrow/safe restricted to templates?  Don't templates *require* availability of source?

Just saying...

-Steve




>________________________________
>From: kenji hara <k.hara.pg at gmail.com>
>To: Discuss the internals of DMD <dmd-internals at puremagic.com>
>Sent: Wednesday, November 16, 2011 5:24 AM
>Subject: Re: [dmd-internals] Type mangling for deduced attributes
>
>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
>_______________________________________________
>dmd-internals mailing list
>dmd-internals at puremagic.com
>http://lists.puremagic.com/mailman/listinfo/dmd-internals
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20111116/e499f5f3/attachment.html>


More information about the dmd-internals mailing list