Alternative decorator syntax decision

Neil Hodgson nhodgson at bigpond.net.au
Fri Aug 20 12:41:48 CEST 2004


Peter Otten:

> I think Java and C# have been discussed on python-dev. Again you could
share
> your experience.

   @Java
http://www.jcp.org/aboutJava/communityprocess/review/jsr175/

   ///@XDoclet was a forerunner that hid the @s inside doc comments
http://xdoclet.sourceforge.net/xdoclet/index.html

   [C# attributes] can be user defined but are static pieces of metadata.
http://msdn.microsoft.com/library/en-us/csspec/html/vclrfcsharpspec_17.asp
   The "eXtensible C#" language extends this to allow compile time actions.
http://www.resolvecorp.com/products.aspx

   Visual C++ attributes are not currently user definable but can inject
code into the output object files. Attributes can only be defined by
Microsoft who have not documented the interface between the compiler and the
attribute provider DLLs. Microsoft have been promising user defined
attributes for a few years now. "Ronald Laeremans attributes" is a good
google key.
http://msdn.microsoft.com/library/en-us/vcattrib/html/vcrefattributesreference.asp

   Microsoft IDL has had a hard coded set of attributes using the [] before
definition syntax for about 15 years
http://msdn.microsoft.com/library/en-us/midl/midl/idl_attributes.asp

   Neil





More information about the Python-list mailing list