<?xml version="1.0" encoding="UTF-8"?><item><title>A language construct I'd like to see</title><description>A new keyword: once&lt;p&gt;&#13;
&#13;
This would be used in cases where you want to do something once, but not subsequent times the block is encountered.  It could be for any language; I'm thinking C# at the moment.&lt;p&gt;&#13;
&#13;
I run across this all the time:&lt;p&gt;&#13;
&#13;
&lt;blockquote&gt;&#13;
&lt;pre&gt;&#13;
bool bPrintedHeader = false;&#13;
while (getSomeData())&#13;
{&#13;
   if (!bPrintedHeader)&#13;
  {&#13;
    bPrintedHeader = true;&#13;
    printHeader();&#13;
  }&#13;
&#13;
  printData();&#13;
}&#13;
&lt;/pre&gt;&#13;
&lt;/blockquote&gt;&#13;
&#13;
With once:&lt;p&gt;&#13;
&#13;
&lt;blockquote&gt;&#13;
&lt;pre&gt;&#13;
while (getSomeData())&#13;
{&#13;
  once&#13;
  {&#13;
    printHeader();&#13;
  }&#13;
&#13;
  printData();&#13;
}&#13;
&lt;/pre&gt;&#13;
&lt;/blockquote&gt;&#13;
&#13;
&lt;p&gt;Less code, easier to read, one less variable in scope outside the while.  What's not to like?</description><pubDate>Thu, 01 Sep 2005 19:17:08 GMT</pubDate></item>