Reserved Words and Language Independence
Microsoft’s .NET Common Language Infrastructure (CLI) specification allows code written in 40+ different programming languages to be combined together into a final product. Because of this, identifier/reserved word collisions can occur when code implemented in one language tries to execute code written in another language. For example, a Visual Basic.NET library may contain a class definition such as:
' Class Definition of This in Visual Basic.NET: Public Class this ' This class does something... End ClassIf this is compiled and distributed as part of a toolbox, a C# programmer, wishing to define a variable of type “this” would encounter a problem: 'this' is a reserved word in C#. Thus, the following will not compile in C#:
A similar issue arises when accessing members, overriding virtual methods, and identifying namespaces.
In order to work around this issue, the specification allows the programmer to (in C#) place the at-sign before the identifier which forces it to be considered an identifier rather than a reserved word by the compiler.
// Using This Class in C#: @this x = new @this; // Will compile!For consistency, this usage is also permitted in non-public settings such as local variables, parameter names, and private members.
Read more about this topic: Reserved Word
Famous quotes containing the words reserved, words, language and/or independence:
“The planet on which we live is poorly organized, many areas are overpopulated, others are reserved for a few, technologys potential is only in part realized, and most people are starving.”
—Friedrich Dürrenmatt (19211990)
“One reason writers write is out of revenge. Life hurts; certain ideas and experiences hurt; one wants to clarify, to set out illuminations, to replay the old bad scenes and get the Treppenworte saidthe words one didnt have the strength or ripeness to say when those words were necessary for ones dignity or survival.”
—Cynthia Ozick (b. 1928)
“This is of the loonI do not mean its laugh, but its looning,is a long-drawn call, as it were, sometimes singularly human to my ear,hoo-hoo-ooooo, like the hallooing of a man on a very high key, having thrown his voice into his head. I have heard a sound exactly like it when breathing heavily through my own nostrils, half awake at ten at night, suggesting my affinity to the loon; as if its language were but a dialect of my own, after all.”
—Henry David Thoreau (18171862)
“I am savage enough to prefer the woods, the wilds, and the independence of Monticello, to all the brilliant pleasures of this gay capital [Paris].”
—Thomas Jefferson (17431826)