<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Random musing: TStringList</title>
	<atom:link href="http://tech.turbu-rpg.com/87/random-musing-tstringlist/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist</link>
	<description>My thoughts on Delphi programming in general, and particularly on the technical aspects of developing the TURBU engine and editor.</description>
	<lastBuildDate>Sun, 29 Jan 2012 00:52:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Marco van de Voort</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-1283</link>
		<dc:creator>Marco van de Voort</dc:creator>
		<pubDate>Mon, 27 Sep 2010 15:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-1283</guid>
		<description>I&#039;ve been thinking about this too, and yes, tstringlist implements way, way too much.

I really would prefer to keep string as native type, and not as object (since if I liked that I wouldn&#039;t be using Delphi in first way). It does have its problem (as in comparison operators can&#039;t be inserted by use of generics)

TStringlist definitely tries to do too much. Besides the already mentioned stuff (ini file parsing, splitting) etc, I don&#039;t like the way that the internal storage format (one/two arrays) bleed through in the format.  The array aspect is what makes inserting into a even a moderately sized ordered array so slow.

I looked around a bit in the generics units, but they use string nowhere. If people have interesting links I&#039;d be interested.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been thinking about this too, and yes, tstringlist implements way, way too much.</p>
<p>I really would prefer to keep string as native type, and not as object (since if I liked that I wouldn&#8217;t be using Delphi in first way). It does have its problem (as in comparison operators can&#8217;t be inserted by use of generics)</p>
<p>TStringlist definitely tries to do too much. Besides the already mentioned stuff (ini file parsing, splitting) etc, I don&#8217;t like the way that the internal storage format (one/two arrays) bleed through in the format.  The array aspect is what makes inserting into a even a moderately sized ordered array so slow.</p>
<p>I looked around a bit in the generics units, but they use string nowhere. If people have interesting links I&#8217;d be interested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabricio</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-145</link>
		<dc:creator>Fabricio</dc:creator>
		<pubDate>Mon, 22 Feb 2010 06:43:42 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-145</guid>
		<description>I agree on Jolyon on this: it would be a mess.
And add an other responsibility of TStringList: parse simple INI files (those which don&#039;t have sections, just key=value pairs).</description>
		<content:encoded><![CDATA[<p>I agree on Jolyon on this: it would be a mess.<br />
And add an other responsibility of TStringList: parse simple INI files (those which don&#8217;t have sections, just key=value pairs).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CR</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-133</link>
		<dc:creator>CR</dc:creator>
		<pubDate>Mon, 15 Feb 2010 18:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-133</guid>
		<description>IMO, it&#039;s probably better that generics weren&#039;t available, or TStrings (and the cleanness of its polymophism) wouldn&#039;t have been invented. As you suggest, the natural approach to TStringList (if it were to have been created in a generics world at all) would have been to derive from TList, not a specialised abstract base class. Polymorphism with the contents of a TListBox, TComboBox, TMemo, etc., wouldn&#039;t then make sense, since it&#039;s the underlying WinAPI control that hold the actual strings, not TListBoxStrings etc.</description>
		<content:encoded><![CDATA[<p>IMO, it&#8217;s probably better that generics weren&#8217;t available, or TStrings (and the cleanness of its polymophism) wouldn&#8217;t have been invented. As you suggest, the natural approach to TStringList (if it were to have been created in a generics world at all) would have been to derive from TList, not a specialised abstract base class. Polymorphism with the contents of a TListBox, TComboBox, TMemo, etc., wouldn&#8217;t then make sense, since it&#8217;s the underlying WinAPI control that hold the actual strings, not TListBoxStrings etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-132</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Mon, 15 Feb 2010 14:34:58 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-132</guid>
		<description>TStringList would still be one of the handiest objects even with generics from day one.  Generics are great for organizing a more complex group of objects but most of the time when I am dealing with TStringList I am just keeping track of some keys, parsing small CSV/text files or using its Sort/Duplicate functionality.  The beauty of TStringList is that it is a simple implementation which means a programmer coming behind me two years from now will be able to easily see what I have done.  Generic implementations can often lead to over-engineering and quite frankly if not used responsibly some very annoying bugs.  If I wanted to abstract all my types, I would have used Smalltalk back in the day.  Often a hard typed class is simply more functional even if it isn&#039;t as flexible.</description>
		<content:encoded><![CDATA[<p>TStringList would still be one of the handiest objects even with generics from day one.  Generics are great for organizing a more complex group of objects but most of the time when I am dealing with TStringList I am just keeping track of some keys, parsing small CSV/text files or using its Sort/Duplicate functionality.  The beauty of TStringList is that it is a simple implementation which means a programmer coming behind me two years from now will be able to easily see what I have done.  Generic implementations can often lead to over-engineering and quite frankly if not used responsibly some very annoying bugs.  If I wanted to abstract all my types, I would have used Smalltalk back in the day.  Often a hard typed class is simply more functional even if it isn&#8217;t as flexible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mason Wheeler</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-131</link>
		<dc:creator>Mason Wheeler</dc:creator>
		<pubDate>Mon, 15 Feb 2010 04:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-131</guid>
		<description>Maybe I should clarify.  I don&#039;t like the idea of pure, single-paradigm OO.  I think it creates more problems than it solves.  I&#039;m just taking about TStringList specifically, which is an object class and part of a (mostly) object-oriented language.</description>
		<content:encoded><![CDATA[<p>Maybe I should clarify.  I don&#8217;t like the idea of pure, single-paradigm OO.  I think it creates more problems than it solves.  I&#8217;m just taking about TStringList specifically, which is an object class and part of a (mostly) object-oriented language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xepol</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-130</link>
		<dc:creator>Xepol</dc:creator>
		<pubDate>Mon, 15 Feb 2010 03:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-130</guid>
		<description>&quot;In object-oriented philosophy, a “good” object is supposed to have a single well-defined responsibility.&quot;  Theory is great, but it often falls apart even before you hit the implementation stage.  If it makes it to the implementation stage untarnished, it will DEFINITELY fall apart then.

Still, it is nice to have a theoretical meter stick to strive for - even if it is an impossible goal.

After all, in pure OO, even the strings and numbers are objects.  With out that, adding generics at D1, I would have to agree with Jolyon -&gt; A huge, HUGE mess.

Perhaps the root problem is actually that we are unavoidably mixing OO and non-OO programming concepts together (even if your code was 100% OO, there is still the OS and libraries to deal with!  dotNet languages really highlight the disconnect. )</description>
		<content:encoded><![CDATA[<p>&#8220;In object-oriented philosophy, a “good” object is supposed to have a single well-defined responsibility.&#8221;  Theory is great, but it often falls apart even before you hit the implementation stage.  If it makes it to the implementation stage untarnished, it will DEFINITELY fall apart then.</p>
<p>Still, it is nice to have a theoretical meter stick to strive for &#8211; even if it is an impossible goal.</p>
<p>After all, in pure OO, even the strings and numbers are objects.  With out that, adding generics at D1, I would have to agree with Jolyon -&gt; A huge, HUGE mess.</p>
<p>Perhaps the root problem is actually that we are unavoidably mixing OO and non-OO programming concepts together (even if your code was 100% OO, there is still the OS and libraries to deal with!  dotNet languages really highlight the disconnect. )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jolyon Smith</title>
		<link>http://tech.turbu-rpg.com/87/random-musing-tstringlist/comment-page-1#comment-129</link>
		<dc:creator>Jolyon Smith</dc:creator>
		<pubDate>Mon, 15 Feb 2010 03:04:42 +0000</pubDate>
		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=87#comment-129</guid>
		<description>&quot;How would having generics available from Delphi 1 have affected the design of TStrings and the VCL in general?&quot;

The short answer:  Arguably more &quot;pure&quot; from an OO-theoretician&#039;s p.o.v but a great deal messier and more confusing in practical terms.  :)</description>
		<content:encoded><![CDATA[<p>&#8220;How would having generics available from Delphi 1 have affected the design of TStrings and the VCL in general?&#8221;</p>
<p>The short answer:  Arguably more &#8220;pure&#8221; from an OO-theoretician&#8217;s p.o.v but a great deal messier and more confusing in practical terms.  <img src='http://tech.turbu-rpg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

