toHash => pure, nothrow, const, @safe

Martin Nowak dawg at dawgfoto.de
Wed Mar 14 06:27:08 PDT 2012


> In essence, when @type is encountered the compiler looks at  
> TypeInfo_Struct (in object.di) for the equivalent xfuncname.  Then uses  
> the attributes of that function pointer (and also the parameter  
> types/count) to compile the given method.
>
Why would you want to add explicit annotation for implicit TypeInfo_Struct  
methods?
I think @type is a very interesting idea if combined with a string->method  
lookup in
TypeInfo_Struct, but this wouldn't allow for static type checking.
If you wanted static type checking then @type could probably refer to  
Interfaces.


More information about the Digitalmars-d mailing list