toHash => pure, nothrow, const, @safe

deadalnix deadalnix at gmail.com
Tue Mar 13 08:56:08 PDT 2012


Le 13/03/2012 01:50, Walter Bright a écrit :
> On 3/12/2012 4:11 AM, deadalnix wrote:
>> For struct, we have inference,
>
> ? No we don't.
>

Ok my mistake. So why not dig in that direction ?

>> so most of the time attributes will correct.
>> const pure nothrow @safe are something we want, but is it something we
>> want to
>> enforce ?
>
> Yes, because they are referred to by TypeInfo, and that's fairly useless
> if it isn't const etc.

I always though that TypeInfo is a poor substitute for metaprograming 
and compile time reflexion.


More information about the Digitalmars-d mailing list