<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Delphi Corner Weblog</title>
	<atom:link href="http://blogs.teamb.com/rudyvelthuis/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.teamb.com/rudyvelthuis</link>
	<description>Rudy Velthuis</description>
	<pubDate>Tue, 14 Jul 2009 09:51:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en-US</language>
			<item>
		<title>Delphi for .NET namespaces misunderstood?</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2006/10/04/27817</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2006/10/04/27817#comments</comments>
		<pubDate>Wed, 04 Oct 2006 11:42:40 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2006/10/04/26309/</guid>
		<description><![CDATA[Confusion
There seems to be a big confusion about Delphi for .NET namespaces. I guess this is because there was a big change between Delphi 8 and Delphi 2005.
In Delphi 8, each unit was its own namespace. In Delphi 2005, several units can be placed in the same namespace, by prefixing the unit name with the [...]]]></description>
			<content:encoded><![CDATA[<h2>Confusion</h2>
<p>There seems to be a big confusion about Delphi for .NET namespaces. I guess this is because there was a big change between Delphi 8 and Delphi 2005.</p>
<p>In Delphi 8, each unit was its own namespace. In Delphi 2005, several units can be placed in the same namespace, by prefixing the unit name with the namespace name. You can even add to an existing namespace in an assembly not written in Delphi for .NET.</p>
<p>I often see the argument that namespaces in Delphi for .NET are non-standard. But since you can create a namespace consisting of several units, in several assemblies, there is in fact no big difference for other .NET languages. To the &quot;outside&quot; world, i.e. to non-Delphi code, they are as standard as they should be.</p>
<p>IOW, if you have units <em>Rudy.Velthuis.Labels</em>, <em>Rudy.Velthuis.EditBoxes</em>, and <em>Rudy.Velthuis.Memos</em> they make up the namespace Rudy.Velthuis, and can be used as such from any non- Delphi .NET language. (FWIW, if your namespace is only meant to contain VCL.NET classes, I see no reason not to use the VCL terminology, i.e. prefix types with T, etc. If your assembly is meant to be used by other languages, then follow the .NET guidelines on naming.)</p>
<p>What is different is that Delphi for .NET internally has the <em>advantage</em> that you don&#8217;t include an entire namespace, filling up the scope with a lot of unnecessary identifiers, but only the units you need. This is IMO a big advantage. If you only need Labels, but not EditBoxes or Memos, you only put Rudy.Velthuis.Labels in your <strong>uses</strong> clause. I&#8217;ll explain why this is IMO a <em>Good Thing&trade;</em></p>
<p>Any good C++ programmer will frown upon the practice of including entire namespaces into the scope. A good C++ programmer will not use</p>
<pre><b>using namespace</b> std;</pre>
<p>but will simply qualify each identifier from that namespace with the explicit <strong>std::</strong> prefix. For the same reason, Modula 2 users can import entire modules, but are encouraged to only import the identifiers they need. Delphi for .NET&#8217;s scope resolution is not that fine grained, but at least it offers units, instead of the inclusion of entire namespaces. Of course this only works with Delphi-written namespaces.</p>
<p>The fact that namespaces are disconnected from physical file names is perhaps not a problem for a compiler (well, it actually is a small problem, since it makes it have to look up and remember &mdash; store &mdash; a lot more identifiers, which makes it slower), but it is a problem for the humans who have to use them. I am glad that Delphi keeps the connection between compilation unit and logical unit.</p>
<h2>Conclusion</h2>
<p>So, to recap:</p>
<ul>
<li>Delphi namespaces are extensible, like in other .NET languages. Several units can make up a namespace, and units can be added to one. They are perhaps non-standard internally, but to the outside .NET world, they are no different than a VB or C# namespace.</li>
<li>Delphi namespaces are usable by other languages as one namespace, no matter how many units it contains.</li>
<li>Internally, when Delphi uses Delphi-written namespaces, Delphi has the added advantage that you don&#8217;t have to include entire namespaces at once, but have a finer grained scoping mechanism.</li>
<li>Delphi units are IMO easier to use than namespaces consisting of several source files and spread over several assemblies.</li>
</ul>
<p> <em>Rudy Velthuis</em></p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=27817&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_27817" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=Delphi%20for%20.NET%20namespaces%20misunderstood%3F&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2006%2F10%2F04%2F27817" id="akst_email_27817" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2006/10/04/27817/feed</wfw:commentRss>
		</item>
		<item>
		<title>My quotes.txt file</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2006/07/29/26308</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2006/07/29/26308#comments</comments>
		<pubDate>Sat, 29 Jul 2006 16:28:33 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[TeamB]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2006/07/29/24553/</guid>
		<description><![CDATA[I put my <a href="http://rvelthuis.de/zips/quotes.txt">quotes.txt file</a> on my website for everyone to use.]]></description>
			<content:encoded><![CDATA[<p>I have often been asked about the quotes I use when writing to the newsgroups. These come from a file called quotes.txt, and are placed under my messages by my news client, <a href="http://www.wilsonc.demon.co.uk/xananews.htm">XanaNews</a>, by some kind of random process. Although, sometimes the quotes are so appropriate, that I still suspect that Colin Wilson (the author of XanaNews) has secretly put a small, hidden artificial intelligence machine into the sources.</p>
<p>Anyway, many people have asked me for the quotes file. That is why I decided to <a href="http://rvelthuis.de/zips/quotes.txt">publish it</a> on my <a href="http://rvelthuis.de">website</a>. I will attempt to update it regularly.</p>
<p>The format is simple: quotes are free form, and are separated by a lines with a single . character on them. If you enhance the quote file with many new and nice quotes, I&#8217;d like you to <a href="mailto:Rudy Velthuis &lt;articles@rvelthuis.de&gt;?subject=Your quotes file">notify me</a>.</p>
<p>Have fun with it.</p>
<p><em>Rudy Velthuis</em></p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=26308&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_26308" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=My%20quotes.txt%20file&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2006%2F07%2F29%2F26308" id="akst_email_26308" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2006/07/29/26308/feed</wfw:commentRss>
		</item>
		<item>
		<title>New article on pointers on my website</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2006/05/01/24552</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2006/05/01/24552#comments</comments>
		<pubDate>Mon, 01 May 2006 16:15:46 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2006/05/01/22632/</guid>
		<description><![CDATA[I wrote a new article on pointers and placed it on my website. Any comments are welcome.
]]></description>
			<content:encoded><![CDATA[<p>I wrote a new <a href="http://rvelthuis.de/articles/articles-pointers.html">article</a> on pointers and placed it on my <a href="http://rvelthuis.de/">website</a>. Any comments are welcome.</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=24552&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_24552" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=New%20article%20on%20pointers%20on%20my%20website&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2006%2F05%2F01%2F24552" id="akst_email_24552" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2006/05/01/24552/feed</wfw:commentRss>
		</item>
		<item>
		<title>Delphi constructors with different names, when used in C++Builder</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/12/22/22631</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2005/12/22/22631#comments</comments>
		<pubDate>Thu, 22 Dec 2005 09:49:45 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/12/22/19999/</guid>
		<description><![CDATA[When multiple constructors are used, with different names but the same parameter types, this may cause problems when the unit must be used in C++Builder.]]></description>
			<content:encoded><![CDATA[<p>The integration of C++Builder and Delphi seems to have caused a few problems for those of us who write components or classes in Delphi, and then want to use these in C++Builder. There are a few things one should avoid when one writes classes (see below), and the symbol BCB doesn&#8217;t seem to be defined when the Delphi compiler is called from C++Builder.</p>
<p>Some of the things one should not do are mentioned on the <a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/jvcl/dev/JVCL3/help/BCB%20Compatibility%20Guide.html">JVCL sourceforge pages</a>.</p>
<p>One other thing is something I discussed elsewhere with someone. In Delphi, it is not unusual to create multiple constructors with different names which tell the user what they do.</p>
<p>A simple example I concocted up is below:</p>
<pre><b>unit</b> GraphicVectors;

<b>interface

uses</b>
  SysUtils, Classes;

<b>type</b>
  TGraphicVector = <b>class</b>(TObject)
  <b>public
    constructor</b> Create(X, Y: Double);
  <b>end</b>;

  TPolarVector = <b>class</b>(TGraphicVector)
  <b>public
    constructor</b> CreatePolar(Radial, Theta: Double);
  <b>end</b>;

<b>implementation</b></pre>
<p>This defines TGraphicVector, which takes two Cartesian coordinates, X and Y, both of type Double. And a descendant TPolarVector, which is internally almost the same, but can be defined using polar coordinates. So TPolarVector has two constructors, the one inherited from TGraphicVector, and CreatePolar, which accepts polar coordinates.</p>
<h5>Constructors which differ only in name</h5>
<p>Problem is, that both have two parameters of type Double. In Delphi, this is not a problem, because the constructors have different names. But C++ constructors do not have any names of their own. They get the name of the class for which they are defined.</p>
<p>So the .hpp file for the unit above contains this, for TPolarVector:</p>
<pre><b>class</b> DELPHICLASS TPolarVector;
<b>class</b> PASCALIMPLEMENTATION TPolarVector : <b>public</b> TGraphicVector
{
    <b>typedef</b> TGraphicVector inherited;

<b>public:
    __fastcall</b> TPolarVector(<b>double</b> Radial, <b>double</b> Theta);
<b>public</b>:
    <em>#pragma option push -w-inl</em>
    <i>/* TGraphicVector.Create */</i> <b>inline __fastcall</b>
        TPolarVector(<b>double</b> X, <b>double</b> Y) : TGraphicVector(X, Y) { }
    <em>#pragma option pop</em>

<b>public</b>:
    <em>#pragma option push -w-inl</em>
    <i>/* TObject.Destroy */</i> <b>inline __fastcall virtual</b> ~TPolarVector(<b>void</b>) { }
    <em>#pragma option pop</em>

};</pre>
<p>You can see the problem above: there are two constructors TPolarvector(double, double). The first is TPolarvector.CreatePolar, the second is TGraphicVector.Create, which must be redeclared as TPolarVector to make it a constructor for TPolarVector as well. C++ does not allow two constructors with the same signature, so you will get two errors for the second declaration:</p>
<blockquote><p>[C++ Error] GraphicVectors.hpp(49): E2238 Multiple declaration for &#8216;_fastcall TPolarVector::TPolarVector(double,double)&#8217;<br />
 [C++ Error] GraphicVectors.hpp(46): E2344 Earlier declaration of &#8216;_fastcall TPolarVector::TPolarVector(double,double)&#8217;</p></blockquote>
<h5>Conclusion</h5>
<p>So, apart from what the JVCL pages describe, you should also avoid using constructors with the same signature but differing in name. It is best if you simply do not use any other constructor name than Create. If you need more than one, be sure to use the overload directive.</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=22631&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_22631" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=Delphi%20constructors%20with%20different%20names%2C%20when%20used%20in%20C%2B%2BBuilder&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2005%2F12%2F22%2F22631" id="akst_email_22631" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2005/12/22/22631/feed</wfw:commentRss>
		</item>
		<item>
		<title>Comments enabled again</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/06/27/19998</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2005/06/27/19998#comments</comments>
		<pubDate>Mon, 27 Jun 2005 13:56:55 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<category><![CDATA[TeamB]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/06/27/14003/</guid>
		<description><![CDATA[In the hope the problems were solved, I enabled comments again.
]]></description>
			<content:encoded><![CDATA[<p>In the hope the problems were solved, I enabled comments again.</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=19998&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_19998" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=Comments%20enabled%20again&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2005%2F06%2F27%2F19998" id="akst_email_19998" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2005/06/27/19998/feed</wfw:commentRss>
		</item>
		<item>
		<title>Blog SPAM</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/06/23/14002</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2005/06/23/14002#comments</comments>
		<pubDate>Thu, 23 Jun 2005 04:18:31 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<category><![CDATA[TeamB]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/06/23/7510/</guid>
		<description><![CDATA[The TeamB blog server has been hit by thousands of blog spam messages (comments/trackbacks). That is why I currently disabled comments, until a solution is found to prevent more of this. Sorry for the inconvenience. :-(
 Rudy Velthuis
]]></description>
			<content:encoded><![CDATA[<p>The TeamB blog server has been hit by thousands of blog spam messages (comments/trackbacks). That is why I currently disabled comments, until a solution is found to prevent more of this. Sorry for the inconvenience. :-(</p>
<p> Rudy Velthuis</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=14002&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_14002" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=Blog%20SPAM&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2005%2F06%2F23%2F14002" id="akst_email_14002" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2005/06/23/14002/feed</wfw:commentRss>
		</item>
		<item>
		<title>Quoting in newsgroups</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/06/12/7509</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2005/06/12/7509#comments</comments>
		<pubDate>Sun, 12 Jun 2005 07:11:36 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[TeamB]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/06/12/4312/</guid>
		<description><![CDATA[Newsgroups are a great way to communicate. One of the big advantages is, that you don&#8217;t have to reply immediately, and that everyone can see your reply. It also means that more than one person can jump into the conversation going on, and write a reply, whenever that person thinks it is convenient to do [...]]]></description>
			<content:encoded><![CDATA[<p>Newsgroups are a great way to communicate. One of the big advantages is, that you don&#8217;t have to reply immediately, and that everyone can see your reply. It also means that more than one person can jump into the conversation going on, and write a reply, whenever that person thinks it is convenient to do so. This means that a thread in a newsgroups is not linear or chronological, but can have many sub-branches.</p>
<p>If you scan a newsgroup for a new, unread reply, the reply you find may be a reply to a message made a few days ago, and in a completely different thread or subthread than the message you were reading only a few minutes ago. To remind you of the context of the reply, i.e. to give the reader an indication to what the poster was replying, it is usual to quote (cite) a part of the message to which the reply was made. To make it apparent what was quoted, the quotes are usually marked with a special character, often &gt;, at the start of every line. Many newsreaders allow you to automatically quote the entire previous message when you write a reply. That is of course very convenient for the poster, but it can be a problem for the reader.</p>
<p>If everyone simply quoted the entire previous message (with previous I mean the message to which the reply is made), the final message contains quote over quote of all the previous messages, so more or less the entire thread leading to that point. This may be fine for those who start reading in the middle of a thread, but it wastes an enormous amount of bandwidth, and it gets harder and harder to actually find the actual reply, especially since some people reply at the start of the message (i.e. above the quotes) and some reply below the quotes, or inline, i.e. replying separately to each point made. </p>
<p>In Usenet, a large set of mostly freely available newsgroups shared across many servers around the world, people have tried to define standards for quoting, to avoid this terrible mess. A short version of these (very inofficial) rules, with my personal comments, is:</p>
<ul>
<li>Mark your quotes with a &gt; character. There are different ways of marking a quote, but the &gt; has become some kind of de facto standard, and any other way of quoting makes your replies harder to read, for many people.</li>
<li>Reply <strong>below</strong> the quotes, or inline (which is similar). I know this is a controversial point, but IMO this is the only logical way of replying. Like someone said:
<p> A: Because it fouls the order in which people normally read text.<br />
 Q: Why is top-posting such a bad thing?<br />
 A: Top-posting.<br />
 Q: What is the most annoying thing on usenet and in e-mail?</p>
<p> Top-posting is putting your reply above the quotes. One other disadvantage is that someone who expects replies below the quotes, or inline, will have to scroll to the end of the message to see if there is more.</li>
<li>Do not <strong>overquote</strong>. Delete those parts of the quotes which are not necessary to assist the reader in remembering what the previous message was about. If the relation between quotes and new content of a message is grossly in favour of the quotes, one may talk about overquoting. This is a nuisance, since it requires people to read or scroll over a lot of stuff before they see any reply. It also wastes bandwidth, and space on the harddisks of your readers.</li>
<li>Do not <strong>underquote</strong>. If you don&#8217;t quote at all, or not enough, the reader does not have a context, and may be forced to re-read the previous message to remember what is going on, or to see to what you are actually replying.</li>
</ul>
<p>These are my personal views on quoting, and others may have different opinions. But I hope to have given a hint on how newsgroup reading can be made more pleasant. You don&#8217;t have to follow my rules, but notice that if you don&#8217;t, you might be doing your readers a disservice, and they might decide that they&#8217;d rather not read your messages anymore.</p>
<p><strong>Update</strong>: I came across <a href="http://www.blakjak.demon.co.uk/gey_chr0.htm">this article</a> from a blind person about top-posting. Top-posting seems to confuse a popular newsreader for the blind. One more reason to abandon it, <acronym title="in my opinion">IMO</acronym>.</p>
<p><em>Rudy Velthuis</em></p>
<h3>Links</h3>
<ul>
<li><a href="http://www.uwasa.fi/~ts/http/quote.html">FAQ: Of Proper quoting</a></li>
<li><a href="http://alt-usage-english.org/posting_quotes.html">Quoting Usenet Articles in Follow-ups</a></li>
<li><a href="http://www.mccaughan.org.uk/g/remarks/uquote.html">The advantages of Usenets quoting conventions</a></li>
</ul>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=7509&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_7509" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=Quoting%20in%20newsgroups&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2005%2F06%2F12%2F7509" id="akst_email_7509" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2005/06/12/7509/feed</wfw:commentRss>
		</item>
		<item>
		<title>More undocumented Win32 language features</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311#comments</comments>
		<pubDate>Fri, 13 May 2005 11:14:17 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/05/13/4271/</guid>
		<description><![CDATA[I received a few interesting replies to my previous post about features 
Borland implemented in the Win32 compiler for Delphi, but &#34;forgot&#34; to 
document. I'm sure you can find them in the comments section, but I'd like to 
repeat them here.]]></description>
			<content:encoded><![CDATA[<h3>Following up</h3>
<p>I received a few interesting replies to my previous post about features Borland implemented in the Win32 compiler for Delphi, but &quot;forgot&quot; to document. I&#8217;m sure you can find them in the comments section, but I&#8217;d like to repeat them here.</p>
<p>Gerriz Beuze and Rossen Assenov mentioned some other features and I checked them. These seem to be valid in the Win32 personality of Delphi 2005 too:</p>
<ul>
<li>Default array properties can be overloaded, i.e. have the same name,   as long as the signature, i.e. the array parameter list, is different.
<pre><b>type</b>
  TTestClass = <b>class
  private
    function</b> GetInts(index: Integer): Integer;
    <b>procedure</b> SetInts(index: Integer; <b>const</b> Value: Integer);
    <b>function</b> GetIntsS(Find: <b>string</b>): Integer;
    <b>procedure</b> SetIntsS(Find: <b>string</b>; <b>const</b> Value: Integer);
  <b>public
    property</b> Ints[index: Integer]: Integer <b>read</b> GetInts <b>write</b> SetInts;
      <b>default</b>;
    <b>property</b> Ints[Find: <b>string</b>]: Integer <b>read</b> GetIntsS <b>write</b> SetIntsS;
      <b>default</b>;
  <b>end</b>;
</pre>
</li>
<li>Identifier escape char &quot;&amp;&quot; is supported. You can do something like:
<pre><b>var</b>
  &amp;object: TObject;
</pre>
</li>
<li>Method directive &quot;final&quot; supported.</li>
<li>Method directive &quot;inline&quot; is supported. But, unlike Gerrit   claimed, it also works in .NET.</li>
<li>Static class methods are supported.</li>
<li>Class properties are supported:
<pre><b>  private
    class function</b> GetClassProp: Integer; <b>static</b>;
    <b>class procedure</b> SetClassProp(<b>const</b> Value: Integer); <b>static</b>;
  <b>public
    class property</b> P: Integer <b>read</b> GetClassProp <b>write</b> SetClassProp;</pre>
</li>
<li>Compiler hint directive &quot;experimental&quot; is supported.
<pre><b>unit</b> SomeName <b>experimental</b>;</pre>
</li>
<li>Classes support the &quot;abstract&quot; and &quot;sealed&quot; directives.</li>
<li>Classes can contain &quot;const&quot;, &quot;type&quot; and &quot;var&quot; declarations:
<pre><b>type</b>
  TAbstract = <b>class abstract
  public
    type</b>
      TTestArray = <b>array of</b> Integer;
      TSealed = <b>class sealed
        procedure</b> DoIt(Param: Integer);
      <b>end</b>;
    <b>const</b>
      Cons = 13;
      ConsB: Integer = 12;
    <b>var</b>
      Y: Integer;
  <b>end</b>;
</pre>
</li>
</ul>
<h4>Some more</h4>
<p> I found some more features, officially introduced in Delphi 8 and Delphi 2005 for the .NET compiler, which also work in the Win32 personality:
<ul>
<li>Code folding regions:
<pre><em>{$REGION 'private members'}
  // ...
{$ENDREGION}</em></pre>
<p> This is not really a surprise, since they seem to be more an IDE feature than a language feature, but the language must still know them, and not throw an error.</p>
</li>
<li>Dynamic initialization of dynamic arrays, using the Create syntax:
<pre>
  <b>type</b>
    TDoubleArray = <b>array of</b> Double;

  <b>var</b>
    A: TDoubleArray;
    D: Double;

  <b>begin</b>
    A := TDoubleArray.Create(1.7, 3.9, 17.1, 39.7, 42.0);
    <b>for</b> D <b>in</b> A <b>do</b>
      Writeln(D:1:1);
    <em>// etc...</em>
</pre>
<p> I&#8217;m not sure if that is actually documented anywhere, not even for the .NET compiler (where this already worked in Delphi 8, see the KnobControl demo control in the demos that come with Delphi).</li>
</ul>
<h3>But why undocumented?</h3>
<p>It seems that some of them are not completely undocumented. The <a href="http://www.borland.com/products/white_papers/pdf/delphi_2005_reviewers_guide.pdf">Borland Delphi 2005 Reviewer&#8217;s Guide</a> discusses the Win32 compiler (page 59ff.). It mentions function inlining, nested types, strict private, nested consts, support for Pentium 4 SSE3 and SSE2 instruction opcodes and data types, and XML document generation (some of which I hadn&#8217;t even noticed). A <a href="http://bdn.borland.com/article/0,1410,33050,00.html#4DelphiforNETLanguageEnhancements">BDN article</a> by Bob Swart mentions a few new features as well, but for .NET. I tried them in Win32, and they don&#8217;t compile.</p>
<p>I&#8217;m not sure why the rest is undocumented though, and why Borland is not advertising these new features. Perhaps they were not finalized yet, and Borland doesn&#8217;t want to support them, right now. Perhaps they were simply forgotten in the documentation. But the fact that they are undocumented means that you should take extreme care when you use these features. One problem I noticed is with class helpers.</p>
<h4>Class helpers</h4>
<p>In the previous post, I mentioned class helpers. They do work, but if you try to derive from a &quot;helped&quot; class, you might get an internal compiler error, which means that the implementation is not fully OK yet. Like I said, always use undocumented features with care.</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=4311&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_4311" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=More%20undocumented%20Win32%20language%20features&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2005%2F05%2F13%2F4311" id="akst_email_4311" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311/feed</wfw:commentRss>
		</item>
		<item>
		<title>&#8216;Undocumented&#8217; Win32 in Delphi 2005</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270#comments</comments>
		<pubDate>Wed, 11 May 2005 05:09:32 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/05/11/657/</guid>
		<description><![CDATA[<p>Yesterday, I was surprised to find out that there are people who don't 
	know that Delphi 2005 also contains a Win32 personality. Not only does it 
	contain such a personality, the compiler also has a few enhancements I would 
	only have expected in the .NET version.</p>]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I was surprised to find out that there are people who don&#8217;t 	know that Delphi 2005 also contains a Win32 personality. Not only does it 	contain such a personality, the compiler also has a few enhancements I would 	only have expected in the .NET version.</p>
<h3>Class helpers</h3>
<p>Class helpers were initially devised to help port Delphi&#8217;s Win32 RTL and 	VCL code to .NET. Using class helpers, Borland was able to map Delphi&#8217;s 	<em>TObject</em> to .NET&#8217;s <em>System.Object</em>, and some other Delphi 	base classes to their .NET equivalent as well, while retaining their Delphi- 	typical properties and methods. But it seems that class helpers are also 	available in the Win32 compiler. To me, it is not entirely clear how this 	could be exploited, but I&#8217;m sure that one day, someone will come up with 	some nifty solution to a problem, using class helpers.</p>
<p>If you want to know how class helpers work, there is a section on them in 	the online help for Delphi 2005.</p>
<h3>Strict private and strict protected</h3>
<p>The <em>private</em> and <em>protected</em> sections of Delphi classes 	were, according to purists, severely flawed, because they did not prevent 	access to <em>private</em> or <em>protected</em> fields or methods from code 	in the same unit. The Delphi RTL and VCL actually use this 	&quot;friend&quot; concept, so it was not so easy to simply remove it.</p>
<p>But in .NET, <em>private</em> and <em>protected</em> really had to be 	just that, i.e. no other code should have access to these items (except of 	course descendant classes to <em>protected</em> items). So we got <em>strict 	private</em> and <em>strict protected</em> sections. Although this is not 	documented, it seems that these are also available in the Win32 compiler (thanks to Rob Kennedy for finding out). 	I&#8217;m sure that those who have been asking for this for a long time will be 	pleased to hear this.</p>
<h3>Dotted unit names</h3>
<p>OK, this feature is not entirely new. Delphi 7 also had it, but it was 	not documented or enforced there. I specifically call them dotted names, and 	not namespaces, because AFAIK, the concept of namespaces is still reserved 	for .NET. Still, I think it makes it easier to name units.</p>
<h3>Are there more of these?</h3>
<p>If anyone knows more of these undocumented compiler enhancements (also 	for .NET), I&#8217;d love to hear about them, and I will include them in this or a 	new blog entry.</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=4270&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_4270" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=%26%238216%3BUndocumented%26%238217%3B%20Win32%20in%20Delphi%202005&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2005%2F05%2F11%2F4270" id="akst_email_4270" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270/feed</wfw:commentRss>
		</item>
		<item>
		<title>Warez</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2004/06/27/656</link>
		<comments>http://blogs.teamb.com/rudyvelthuis/2004/06/27/656#comments</comments>
		<pubDate>Sun, 27 Jun 2004 02:02:39 +0000</pubDate>
		<dc:creator>Rudy Velthuis</dc:creator>
		
		<category><![CDATA[TeamB]]></category>

		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2004/06/27/645/</guid>
		<description><![CDATA[Someone is abusing my name and TeamB tag on a Russian warez site.]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I was informed that one or more persons are abusing my name and my TeamB tag on a Russian <a href="http://www.google.com/search?q=define%3A+warez">warez</a> site, to post pirated software there. Of course my first actions were to report this site to Borland, to thank the person warning me, and to inform TeamB.</p>
<p>Everyone with a few working brain cells ought to be able to figure out that no member of TeamB would ever post pirated software on a pirate site. Not only would this be illegal, it would be foolish as well, since we have no personal interest in doing something like that at all. It would thoroughly ruin our good relation with Borland, and our credibility as members of the team.</p>
<p>One other thing to note: members of TeamB only use their TeamB tags on the Borland server. If you see this tag used somewhere else, it was either a mistake, or, much more likely, an impostor.</p>
<p class="akst_link"><a href="http://blogs.teamb.com/rudyvelthuis/?p=656&amp;akst_action=share-this"  title="Post to del.icio.us, etc." id="akst_link_656" class="akst_share_link" rel="nofollow">Share This</a> | <a href="mailto:?subject=Warez&body=Have you seen this? http%3A%2F%2Fblogs.teamb.com%2Frudyvelthuis%2F2004%2F06%2F27%2F656" id="akst_email_656" class="akst_share_email" rel="nofollow">Email this page to a friend</a></p>]]></content:encoded>
			<wfw:commentRss>http://blogs.teamb.com/rudyvelthuis/2004/06/27/656/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
