<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.eiffelroom.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - string - Comments</title>
 <link>http://www.eiffelroom.com/tag/string</link>
 <description>Comments for &quot;string&quot;</description>
 <language>en</language>
<item>
 <title>Done...</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-207</link>
 <description>&lt;p&gt;Wiki document on &lt;a href=&quot;http://eiffelsoftware.origo.ethz.ch/index.php/Immutable_Strings&quot;&gt;Immutable Strings&lt;/a&gt;.&lt;/p&gt;

</description>
 <pubDate>Wed, 18 Apr 2007 10:42:21 -0700</pubDate>
 <dc:creator>paulbates</dc:creator>
 <guid isPermaLink="false">comment 207 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>I think the signature of</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-205</link>
 <description>&lt;p&gt;I think the signature of is_equal is subject to change anyway.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;geshifilter eiffel&quot;&gt;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;like&lt;/span&gt; &lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;/code&gt; will be replaced with &lt;code class=&quot;geshifilter eiffel&quot;&gt;&lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+ANY&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;/code&gt; IIRC.&lt;/p&gt;

&lt;p&gt;-- mTn-_-|&lt;/p&gt;

</description>
 <pubDate>Tue, 17 Apr 2007 09:36:44 -0700</pubDate>
 <dc:creator>mtn</dc:creator>
 <guid isPermaLink="false">comment 205 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Taking the discussion elsewhere.</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-204</link>
 <description>&lt;p&gt;I&#039;m in the process of creating a Wiki page with rationale and implementation suggestions. I&#039;ll post a link when it in at least a legible draft state.&lt;/p&gt;

</description>
 <pubDate>Tue, 17 Apr 2007 09:33:54 -0700</pubDate>
 <dc:creator>paulbates</dc:creator>
 <guid isPermaLink="false">comment 204 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Comparison</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-203</link>
 <description>&lt;p&gt;I think &lt;code class=&quot;geshifilter eiffel&quot;&gt;READABLE_STRING&lt;/code&gt; is better than &lt;code class=&quot;geshifilter eiffel&quot;&gt;READONLY_STRING_GENERAL&lt;/code&gt; (because the dynamic type may also be writable, and I think we will not need _8 and _32 descendants for this class).&lt;/p&gt;

&lt;p&gt;For comparison, there is &lt;code class=&quot;geshifilter eiffel&quot;&gt;same_string&lt;/code&gt; and &lt;code class=&quot;geshifilter eiffel&quot;&gt;is_equal&lt;/code&gt;. &lt;code class=&quot;geshifilter eiffel&quot;&gt;Same_string&lt;/code&gt; can accept a &lt;code class=&quot;geshifilter eiffel&quot;&gt;READABLE_STRING&lt;/code&gt;, and so avoid a conversion, but what about &lt;code class=&quot;geshifilter eiffel&quot;&gt;is_equal&lt;/code&gt;? It takes a &lt;code class=&quot;geshifilter eiffel&quot;&gt;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;like&lt;/span&gt; &lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;/code&gt; argument, and so a conversion will be involved. Colin Adams&lt;/p&gt;

</description>
 <pubDate>Tue, 17 Apr 2007 01:51:22 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 203 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Inherit and convert</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-202</link>
 <description>&lt;p&gt;Can&#039;t we have both 2) and 3)? Mutable strings would conform to constant strings and constant strings would convert to mutable strings. Comparison would use constant strings as argument and hence conformance would be involved (no performance implications). The problem with STRING_GENERAL inheriting from CONSTANT_STRING_GENERAL is that even though it&#039;s a good way for a feature to state that it won&#039;t alter strings passed as arguments if declared as constant, it does not mean that this string will not be modified by another feature (or the same feature after assignment attempt) if its dynamic type is in fact one of a mutable string. So we think that the string passed as CONSTANT_GENERAL_STRING will not change, but it can. In fact it&#039;s not surprising. Even if the inheritance is appealing, a mutable string is not a constant string. It&#039;s like having RECTANGLE inherit from SQUARE. Hmmm, so I guess that in order to be 100% safe we need conversion in both ways. For comparison and performance, we probably need a common ancestor to STRING_GENERAL and CONSTANT_STRING_GENERAL. READONLY_STRING_GENERAL? We can only read the content of the string through this interface, but it&#039;s not necessarily a constant string. Polymorphically it can be attached to a mutable string whose content can be modified.&lt;/p&gt;

</description>
 <pubDate>Tue, 17 Apr 2007 00:57:39 -0700</pubDate>
 <dc:creator>ericb</dc:creator>
 <guid isPermaLink="false">comment 202 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Questionnaire</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-201</link>
 <description>&lt;p&gt;It might be worth running a poll on this. Options such as: &lt;ol&gt;
    &lt;li&gt; Keep the status Quo&lt;/li&gt;
    &lt;li&gt; Have STRING_GENERAL inherit CONSTANT_STRING_GENERAL (breaking all existing Eiffel code)&lt;/li&gt;
    &lt;li&gt; as my suggestion, despite the performance implications&lt;/li&gt;
&lt;/ol&gt;

&lt;/p&gt;

&lt;p&gt;Colin Adams&lt;/p&gt;

</description>
 <pubDate>Mon, 16 Apr 2007 10:14:08 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 201 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>I agree</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-200</link>
 <description>&lt;p&gt;Immutable STRING variants are something that I&#039;ve brought up a number of times. I fully agree that Eiffel needs immutable strings. Keep up the comments.&lt;/p&gt;

</description>
 <pubDate>Mon, 16 Apr 2007 09:27:30 -0700</pubDate>
 <dc:creator>paulbates</dc:creator>
 <guid isPermaLink="false">comment 200 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Performance of string comparisons</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-195</link>
 <description>&lt;p&gt;The disadvantage of using convert is that the cost of string comparisons, already an expensive operation, is increased by the need to create a temporary object. Colin Adams&lt;/p&gt;

</description>
 <pubDate>Sat, 14 Apr 2007 08:23:13 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 195 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>CONSTANT_STRING</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-194</link>
 <description>&lt;p&gt;&lt;code class=&quot;geshifilter eiffel&quot;&gt;CONSTANT_STRING_GENERAL&lt;/code&gt;, &lt;code class=&quot;geshifilter eiffel&quot;&gt;CONSTANT_STRING_8&lt;/code&gt; and &lt;code class=&quot;geshifilter eiffel&quot;&gt;CONSTANT_STRING_32&lt;/code&gt; look like better names. Colin Adams&lt;/p&gt;

</description>
 <pubDate>Fri, 13 Apr 2007 23:49:50 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 194 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Mutable strings are evil</title>
 <link>http://www.eiffelroom.com/blog/colin_adams/read_only_strings#comment-193</link>
 <description>&lt;p&gt;I, too, often encounter hard-to-track-down bugs in Eiffel code caused by the fact that STRING is mutable. Every other OO language that I&#039;ve worked with (Delphi, C#, Java) treats strings as immutable. This is a bit weird, because it means that strings are reference types with some expanded semantics; so the Eiffel approach is more consistent with the rest of the type system. But having a few years of Eiffel development under my belt now, I can safely say that it&#039;s not just a prejudice based on what I&#039;m used to: mutable strings are evil!&lt;/p&gt;

</description>
 <pubDate>Fri, 13 Apr 2007 20:22:35 -0700</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 193 at http://www.eiffelroom.com</guid>
</item>
</channel>
</rss>
