<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fabulous Adventures In Coding : Jargon</title><link>http://blogs.msdn.com/ericlippert/archive/tags/Jargon/default.aspx</link><description>Tags: Jargon</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Use your legs, not your back</title><link>http://blogs.msdn.com/ericlippert/archive/2009/06/18/use-your-legs-not-your-back.aspx</link><pubDate>Thu, 18 Jun 2009 16:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9736077</guid><dc:creator>Eric Lippert</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/ericlippert/comments/9736077.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ericlippert/commentrss.aspx?PostID=9736077</wfw:commentRss><description>&lt;DIV class=mine&gt;
&lt;P&gt;In C# you can "lift", "raise" and "hoist", and they all mean different things.&lt;/P&gt;
&lt;P&gt;To "lift" an operator is to take an operator that operates on non-nullable value types, and create from it a similar operator that operates on nullable value types. (We are a little bit inconsistent in exactly how we use the word "lifted", which I documented &lt;A href="http://blogs.msdn.com/ericlippert/archive/2007/06/27/what-exactly-does-lifted-mean.aspx" mce_href="http://blogs.msdn.com/ericlippert/archive/2007/06/27/what-exactly-does-lifted-mean.aspx"&gt;here&lt;/A&gt;.)&lt;/P&gt;
&lt;P&gt;For example, if you have &lt;/P&gt;&lt;SPAN class=code&gt;
&lt;P&gt;&amp;nbsp;public static Complex operator +(Complex x, Complex y) { ... }&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;then we automatically generate a lifted operator for you that basically does this:&lt;/P&gt;&lt;SPAN class=code&gt;
&lt;P&gt;&amp;nbsp;public static Complex? operator +(Complex? x, Complex? y)&amp;nbsp;&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (x == null || y ==&amp;nbsp;null) ? &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Complex?) null :&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Complex?) (x.Value + y.Value);&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/wkzf914z(VS.71).aspx" mce_href="http://msdn.microsoft.com/en-us/library/wkzf914z(VS.71).aspx"&gt;"Raising" by contrast refers to events&lt;/A&gt; -- not to exceptions, which are&amp;nbsp;of course "thrown".&amp;nbsp;Another common term for raising an event is "firing". Given that&amp;nbsp;it makes sense to standardize on one or the other, the usage committee people felt that&amp;nbsp;between "raising" and "firing", they'd pick the less bellicose-sounding one. Which is maybe a bit silly, but&amp;nbsp;if you've got to pick one, then I suppose that's as good a criterion as any.&lt;/P&gt;
&lt;P&gt;Finally, "hoisting" is what we call it when the compiler&amp;nbsp;emits a field for&amp;nbsp;what looks like a local variable, because that local variable is in fact a captured outer variable of an anonymous function (or a local of an iterator block). When you have:&lt;/P&gt;&lt;SPAN class=code&gt;
&lt;P&gt;class C &lt;BR&gt;{&lt;BR&gt;&amp;nbsp; void M()&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int x = 123;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Func&amp;lt;int, int&amp;gt; f = y=&amp;gt;x+y;&lt;BR&gt;...&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;then we rewrite that as if you'd written something like:&lt;/P&gt;&lt;SPAN class=code&gt;
&lt;P&gt;class C &lt;BR&gt;{&lt;BR&gt;&amp;nbsp; private class&amp;nbsp;Locals&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int x;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int Method(int y) { return this.x + y }&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;&amp;nbsp; void M()&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Locals locals = new Locals();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; locals.x = 123;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Func&amp;lt;int, int&amp;gt; f = locals.Method;&lt;BR&gt;...&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;see, local "x" has been "hoisted" up and out of its declaration space.&lt;/P&gt;
&lt;P&gt;Even after a number of years on the compiler team, I still misuse "raise",&amp;nbsp;"lift" and "hoist" in casual conversation; that they have such similar meanings in English and dissimilar meanings as jargon is unfortunate, but usually doesn't result in too much confusion.&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9736077" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ericlippert/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/ericlippert/archive/tags/Jargon/default.aspx">Jargon</category></item></channel></rss>