<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>NotRocketSurgery: Strings in C++</title>
    <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Relax.</description>
    <item>
      <title>Strings in C++</title>
      <description>&lt;p&gt;Using programming languages such as Ruby and Python (&lt;a href="http://www.journalhome.com/codecraft/9003" title="freedom languages"&gt;freedom languages?&lt;/a&gt;) in order to gain an advantage over over those stuck in the &lt;a href="http://java.sun.com/" title="Java"&gt;past&lt;/a&gt; is sometimes an everyday choice.  Here's a list to remind you of why you chose as you did.&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;"I'm so sad"&lt;/li&gt;
&lt;li&gt;L"I'm so sad"&lt;/li&gt;
&lt;li&gt;W"I'm so sad"&lt;/li&gt;
&lt;li&gt;OLESTR("I'm so sad")&lt;/li&gt;
&lt;li&gt;SysAllocString(L"I'm so sad")&lt;/li&gt;
&lt;li&gt;_T("I'm so sad")&lt;/li&gt;
&lt;li&gt;_TEXT("I'm so sad")&lt;/li&gt;
&lt;li&gt;BSTR&lt;/li&gt;
&lt;li&gt;CAtlString&lt;/li&gt;
&lt;li&gt;CAtlStringA&lt;/li&gt;
&lt;li&gt;CAtlStringW&lt;/li&gt;
&lt;li&gt;CComBSTR&lt;/li&gt;
&lt;li&gt;CSimpleStringT&lt;/li&gt;
&lt;li&gt;CString&lt;/li&gt;
&lt;li&gt;CStringA&lt;/li&gt;
&lt;li&gt;CStringT&lt;/li&gt;
&lt;li&gt;CStringW&lt;/li&gt;
&lt;li&gt;DBTYPE_BSTR&lt;/li&gt;
&lt;li&gt;DBTYPE_STR&lt;/li&gt;
&lt;li&gt;DBTYPE_WSTR&lt;/li&gt;
&lt;li&gt;LPCSTR&lt;/li&gt;
&lt;li&gt;LPCTSTR&lt;/li&gt;
&lt;li&gt;LPCWSTR&lt;/li&gt;
&lt;li&gt;LPOLESTR&lt;/li&gt;
&lt;li&gt;LPSTR&lt;/li&gt;
&lt;li&gt;LPTSTR&lt;/li&gt;
&lt;li&gt;LPWSTR&lt;/li&gt;
&lt;li&gt;OLECHAR&lt;/li&gt;
&lt;li&gt;System::String&lt;/li&gt;
&lt;li&gt;TCHAR&lt;/li&gt;
&lt;li&gt;_bstr_t&lt;/li&gt;
&lt;li&gt;basic_string&amp;lt;char&amp;gt;&lt;/li&gt;
&lt;li&gt;basic_string&amp;lt;wchar_t&amp;gt;&lt;/li&gt;
&lt;li&gt;char *&lt;/li&gt;
&lt;li&gt;std::string&lt;/li&gt;
&lt;li&gt;std::wstring&lt;/li&gt;
&lt;li&gt;wchar_t *&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These all essentially mean "string" in C++.  This list is by no means comprehensive.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 18:02:09 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:8c450eb5-ed4d-4d91-abc7-7d4bb15cbf86</guid>
      <author>kit</author>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c</link>
      <category>programming</category>
      <category>C</category>
      <category>gross</category>
    </item>
    <item>
      <title>"Strings in C++" by face</title>
      <description>&lt;p&gt;The many string implementations is a real problem in C++ &amp;#8211; think about it from a library perspective. I want to provide you some library that works with strings, but I want to do so as conveniently to you as possible. In order to do, I have to use your matching String implementation. This is simply not possible when you want your library to be used by many different people in many different environments.&lt;/p&gt;


	&lt;p&gt;In such a case I chose the lowest common denominator would work best &amp;#8211; ye ol&amp;#8217; char* &amp;#8211; doesn&amp;#8217;t mean I was happy about it.&lt;/p&gt;</description>
      <pubDate>Wed, 16 Aug 2006 02:24:33 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:b676a9c4-cf80-4498-b2c6-b8805c1aa3f3</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c#comment-28</link>
    </item>
    <item>
      <title>"Strings in C++" by name</title>
      <description>&lt;p&gt;wow lets stop the flame war before it starts.. this is pointless.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 23:00:17 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:1bfa02e8-5b5b-48d8-8c3f-c5b38dae8b9c</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c#comment-27</link>
    </item>
    <item>
      <title>"Strings in C++" by Scott D. Strader</title>
      <description>&lt;p&gt;No, complaining that you have to &amp;#8220;deal&amp;#8221; with a chosen framework&amp;#8217;s implementations just shows how misguided and uninformed language comparison can be. Phrakture&amp;#8217;s right: that list is basically a collection of Microsoft wrappers for either Win32, OLE, COM, or C libraries. If you&amp;#8217;re coding in one of those domains, either use the implementations that are given, find a 3rd-party implementation that is more C++ compliant (many elegant libraries exist), or write your own. The option to complain in order to try to start a language war would be better served if there was at least meaningful argument to back it up.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 19:22:41 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:861c4419-8982-40a9-ba11-fc9432cf5080</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c#comment-25</link>
    </item>
    <item>
      <title>"Strings in C++" by bla@blabla.com</title>
      <description>&lt;p&gt;You do realize that Ruby, Java, Perl, PHP, Pyton etc etc all are written in C/C++ for a reason? I don&amp;#8217;t think anyone sane would bootstrap ruby with ruby. Maybe we should hope C stick around for a while longer so  simple (as in not smart) developers like yourself have a scripting language to play with in the first place.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 19:11:33 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:33f7a80d-4e26-4a7b-a937-61a522e67050</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c#comment-24</link>
    </item>
    <item>
      <title>"Strings in C++" by yeahbut</title>
      <description>&lt;p&gt;The point is: being stuck in the world of C++ and having to &amp;#8220;deal&amp;#8221; with the lack of basic data types, like strings, just shows the age of the language.  C/C++ will be around for systems programming for a while to come, but modern, dynamically typed languages are fun and simple simple simple.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 18:50:24 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:d0f878e9-d59f-4673-9414-4ee7b951a911</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c#comment-23</link>
    </item>
    <item>
      <title>"Strings in C++" by phrakture</title>
      <description>&lt;p&gt;Wrong.  There is only one string type in C++.  That is std::basic_string&amp;lt;...&amp;gt;.&lt;/p&gt;


	&lt;p&gt;Your list include std::string and std::wstring which are typedefs of basic_string.  All the other string types listed are proprietary and/or left for C support (char*).&lt;/p&gt;


	&lt;p&gt;Most of your string types are microsoft specific, and in no way part of C++.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 18:43:51 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:bd72b37e-d81e-48c4-8713-707de69cee90</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/13/strings-in-c#comment-22</link>
    </item>
  </channel>
</rss>
