[fpc-devel] .NET Reflection vs RTTI

Micha Nelissen micha at neli.hopto.org
Tue Nov 20 11:34:17 CET 2007


Thorsten Engler wrote:
> Take a look here to get some idea about the uses for attributes in just the
> core framework: http://msdn2.microsoft.com/en-us/library/2e39z096.aspx

What? Most sounds like poor hacks to get around compiler/linker limitations.

<paste>
Microsoft.VisualC.DebugInfoInPDBAttribute: An attribute applied to 
native classes that tells the debugger to look up field information in 
the pdb rather than in metadata.

Microsoft.VisualC.DecoratedNameAttribute: An attribute used by the 
compiler to pass the decorated name of a method to the linker.

System.CLSCompliantAttribute: Indicates whether a program element is 
compliant with the Common Language Specification (CLS). This class 
cannot be inherited.
</paste>

Half of them have "This class cannot be inherited.".

There are also useful ones though:

<paste>
System.ComponentModel.DefaultPropertyAttribute: Specifies the default 
property for a component.
</paste>

No, wait! We already have that! :-)

Perhaps there are also useful ones, that do reduce application and 
framework programmers code significantly?

Micha



More information about the fpc-devel mailing list