<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.eiffelroom.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - Comments</title>
 <link>http://www.eiffelroom.org</link>
 <description>Comments</description>
 <language>en</language>
<item>
 <title>integer intervals and file line processing</title>
 <link>http://www.eiffelroom.org/article/eiffel_for_rubyists#comment-528</link>
 <description>&lt;p&gt;upto can be done in Eiffel with integer intervals:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;1&lt;/span&gt; |..| &lt;span style=&quot;color: #FF0000;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #000060;&quot;&gt;do_all&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;agent&lt;/span&gt; ...&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;it doesn&#039;t currently allow descending but we&#039;re not too far...&lt;/p&gt;

&lt;p&gt;For reading files I&#039;d rather see an iterator like API rather, where the processing agent takes a line, than having to iterate lines by hand: solves 2 problems in one go.&lt;/p&gt;

</description>
 <pubDate>Tue, 18 Nov 2008 12:19:03 -0800</pubDate>
 <dc:creator>nenieorg</dc:creator>
 <guid isPermaLink="false">comment 528 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>You can have object equality without expanded</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-527</link>
 <description>&lt;p&gt;I agree that if expanded is removed, including for basic types, you need to adapt the rules so that &#039;=&#039; points to object equality. I had left that as an exercise to the reader. Shouldn&#039;t be too taxing (e.g. have an altogether distinct operator or function for reference equality, frankly it would be clearer, it&#039;s not as if you actually need ref equality very often). Some exercises are left to the reader re tidying up ref semantics for numbers (one can think of a few angles) though I don&#039;t expect show stopping problems to pop up there (in a new language).&lt;/p&gt;

&lt;p&gt;Performance is a moot point because whether you live conceptually in a reference-only model or an expanded one, a compiler can optimise one model into the implied &#039;natural&#039; implementation of the other: that is implement expanded semantics with hidden pointers (what Eiffel compilers have often done until now for custom expandeds) or implement immutable references with hidden copying (trivially when no ref equality use is detected in a program), so I think expanded just pollutes the abstract model for nothing much.&lt;/p&gt;

</description>
 <pubDate>Tue, 18 Nov 2008 08:59:34 -0800</pubDate>
 <dc:creator>nenieorg</dc:creator>
 <guid isPermaLink="false">comment 527 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Immutable collections</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-526</link>
 <description>&lt;p&gt;On second thought, there is one library where the notion of immutable collections is necessary: the MML library which provides mathematical models to write specifications with.  Consistently, I am strongly in favor of making every exposed class expanded and I don&#039;t think I would add classes such as MML_SET_REF since there is no need for them to be mutable (at least as far as I can see).  I don&#039;t exclude it yet, though.&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Sun, 16 Nov 2008 11:49:14 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 526 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Hash table has not been required to be immutable, yet</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-525</link>
 <description>&lt;p&gt;An important difference with hash tables is that nobody has suggested to make them immutable yet.  It would seem that aliasing hash tables create less problems than aliasing strings.  I think for such classes, we are used to be careful and we duplicate them explicitly whenever we want to avoid aliasing.&lt;/p&gt;

&lt;p&gt;Object identity is only made useless in the case of immutable objects.&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Sun, 16 Nov 2008 09:05:32 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 525 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>And hash tables?</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-524</link>
 <description>&lt;p&gt;As far as I can follow your argument, then it applies to hash tables too. Or any other container class. Again, the negative result from reference comparison doesn&#039;t tell us anything interesting. Do you think they should be expanded too? Colin Adams&lt;/p&gt;

</description>
 <pubDate>Sun, 16 Nov 2008 00:30:24 -0800</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 524 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>No need for string identity</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-523</link>
 <description>&lt;p&gt;&amp;gt; My argument is that you were apparently propagating the common  &lt;br /&gt;
 &amp;gt; fallacy that expanded classes are free of aliasing issues. They are so  &lt;br /&gt;
 &amp;gt; only if all their attributes are also expanded, which makes the feature  &lt;br /&gt;
 &amp;gt; considerably more brittle and less useful. It&#039;s particularly misleading  &lt;br /&gt;
 &amp;gt; if naive people get thinking they can rely on this property for any  &lt;br /&gt;
 &amp;gt; expanded class.&lt;/p&gt;

&lt;p&gt;&amp;gt; The aliasing properties of an expanded class are not enforced by any  &lt;br /&gt;
 &amp;gt; validity constraint, and cannot be known from the flat short of a class  &lt;br /&gt;
 &amp;gt; (even if it doesn&#039;t export any routine it could still be subject to transitive  &lt;br /&gt;
 &amp;gt; aliasing). So expanded is just a hint that a class might, or might not,  &lt;br /&gt;
 &amp;gt; have interesting properties re aliasing.&lt;/p&gt;

&lt;p&gt;All I say is that an expanded class cannot be aliased although it can cause aliasing of other objects.  Regarding the aliasing of a string&#039;s representation, it is up to the implementation of STRING to make sure that no side effects are applied to aliased object.  It is doable and it is a sufficient statement for the issue I am trying to address.  The matter at hand is to determine what use we can make of a string&#039;s identity.  In most cases, there is no use for it and this is why we should compare its semantics to that of integers and reals.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
 &amp;gt; And given that you can do all you&#039;re trying to with aliasing with  &lt;br /&gt;
 &amp;gt; immutable (no-command) classes, with more or less the same  &lt;br /&gt;
 &amp;gt; balance of advantages and disadvantages, is there any use left  &lt;br /&gt;
 &amp;gt; for this feature? I don&#039;t think so.&lt;/p&gt;

&lt;p&gt;I think that, by saying that, you miss the point completely.  If we use reference type as the default for strings, and we have two string references s1 and s2, then&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;s1 = s2&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Would yield a correct true result really quickly but the negative result cannot be relied upon.  We end up having to use &lt;code class=&quot;geshifilter eiffel&quot;&gt;equal&lt;/code&gt; in this case (which is what would be used in the case of expanded types).  Maybe we can think that we save on copy since a reference copy is done in constant time.  Well, we can implement an expanded string copy in constant time too so the argument for immutable strings is not very strong here either.&lt;/p&gt;

&lt;p&gt;What we have with reference type strings is what we could call conceptual pollution.  We have two distinct notions of what a particular (reference type) string is: its identity and its value.  We know its identity has no use at all since the strings would be immutable so they can only be the source of confusion and should be eliminated altogether (in the case of strings).  Hence, let&#039;s use expanded classes to model regular strings.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
 &amp;gt; If expanded was removed from, or hadn&#039;t been in the language  &lt;br /&gt;
 &amp;gt; in the first place, we&#039;d just have a better, cleaner, less confusing  &lt;br /&gt;
 &amp;gt; language at no loss of expressiveness.&lt;/p&gt;

&lt;p&gt;Would you rather have only reference types for integers, characters and reals?  I wouldn&#039;t.  Saying that it is much more efficient to have them as expanded types is merely an interesting addition.  The matter is that expanded classes capture the right abstraction for those classes.  It is also true for strings.  It is all a matter of thinking in terms of the right abstraction.&lt;/p&gt;

&lt;p&gt;I&#039;m not sure I said it often enough but seeking the right abstraction is what should drive the activity of designing classes and it leads directly to the conclusion that making strings expanded is far superior to making them immutable.&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Sat, 15 Nov 2008 20:05:30 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 523 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>This is for any platform</title>
 <link>http://www.eiffelroom.org/blog/ted_eiffel/eiffelstudio_less_emissive_on_the_screen#comment-522</link>
 <description>&lt;p&gt;Note the dark_es.xml is not only for unix, it is for EiffelStudio on any platform (even Windows). While dark_es.reg works only for Windows (but it is much more convenient). We should make a tool to quickly export/import preferences. It is possible with EiffelStudio&#039;s preferences dialog, but it is slow because for most of the preferences, there is a &amp;quot;change_action&amp;quot; which trigger update on the UI side. We could add a usage to &amp;quot;ec&amp;quot;, something like  &amp;quot;ec --load-preferences prefs.xml&amp;quot;, so it would load the preferences before any UI is really built.&lt;/p&gt;

&lt;p&gt;So it was just to say, you should rename dark_es_unix.zip into  dark_es_anyplatform.zip and add a little text to explain how to &amp;quot;import&amp;quot; this unzipped file.&lt;/p&gt;

&lt;p&gt;However, the goal of this article is mostly to show the possibility to have almost a dark color theme (or any color theme)&lt;/p&gt;

</description>
 <pubDate>Fri, 14 Nov 2008 00:09:46 -0800</pubDate>
 <dc:creator>Jocelyn Fiat</dc:creator>
 <guid isPermaLink="false">comment 522 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>No need for expanded</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-521</link>
 <description>&lt;p&gt;My argument is that you were apparently propagating the common fallacy that expanded classes are free of aliasing issues. They are so only if all their attributes are also expanded, which makes the feature considerably more brittle and less useful. It&#039;s particularly misleading if naive people get thinking they can rely on this property for any expanded class.&lt;/p&gt;

&lt;p&gt;The aliasing properties of an expanded class are not enforced by any validity constraint, and cannot be known from the flat short of a class (even if it doesn&#039;t export any routine it could still be subject to transitive aliasing). So expanded is just a hint that a class might, or might not, have interesting properties re aliasing.&lt;/p&gt;

&lt;p&gt;And given that you can do all you&#039;re trying to with aliasing with immutable (no-command) classes, with more or less the same balance of advantages and disadvantages, is there any use left for this feature? I don&#039;t think so.&lt;/p&gt;

&lt;p&gt;If expanded was removed from, or hadn&#039;t been in the language in the first place, we&#039;d just have a better, cleaner, less confusing language at no loss of expressiveness.&lt;/p&gt;

</description>
 <pubDate>Thu, 13 Nov 2008 08:47:18 -0800</pubDate>
 <dc:creator>nenieorg</dc:creator>
 <guid isPermaLink="false">comment 521 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Thank you</title>
 <link>http://www.eiffelroom.org/blog/ted_eiffel/eiffelstudio_less_emissive_on_the_screen#comment-520</link>
 <description>&lt;p&gt;Thank you Jocelyn for the Unix version.&lt;/p&gt;

</description>
 <pubDate>Wed, 12 Nov 2008 22:57:04 -0800</pubDate>
 <dc:creator>ted_eiffel</dc:creator>
 <guid isPermaLink="false">comment 520 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>expanded must be applied to the STRING class</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-519</link>
 <description>&lt;p&gt;In your example, PERSON is not aliasable.  Whatever you do, it is impossible to have to references to the same PERSON instance.  In my proposal, I say that STRING should be expanded and, of course, the implementation should make sure that no harmful aliasing can happen.&lt;/p&gt;

&lt;p&gt;One important thing to do for this is to make sure the client cannot manipulate directly the implementation.  Among other things, this means that there should be no setter for the internal representation of the string.&lt;/p&gt;

&lt;p&gt;On the other hand, the copy mechanism of the string should be carefully designed to make sure that, if the representation is aliased, a flag is set so that no side effect is applied to the representation until it has been duplicated.&lt;/p&gt;

&lt;p&gt;In your example, expanded has no effect because it is applied to the wrong class.  If you apply it to STRING, you will see that the last statement has no effect at all.  If I&#039;m not mistaken, a.name will yield a copy of a&#039;s name which will be mutated and lost.&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Wed, 12 Nov 2008 08:06:08 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 519 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>.reg is for Windows only</title>
 <link>http://www.eiffelroom.org/blog/ted_eiffel/eiffelstudio_less_emissive_on_the_screen#comment-518</link>
 <description>&lt;p&gt;.reg is for Windows only, it is a way to import value into registry keys. However, for any platform, you can do the following&lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt; Open the preferences dialog&lt;/li&gt;
    &lt;li&gt; download dark_es.xml from &lt;a href=&quot;http://gist.github.com/24157&quot;&gt;http://gist.github.com/24157&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt; click on import (bottom) using this dark_es.xml file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It might take some time, but at the end, you&#039;ll get the preferences &amp;quot;patched&amp;quot; with the one from the dark_es.xml file.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;

</description>
 <pubDate>Wed, 12 Nov 2008 05:54:02 -0800</pubDate>
 <dc:creator>Jocelyn Fiat</dc:creator>
 <guid isPermaLink="false">comment 518 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Beautiful, but ...</title>
 <link>http://www.eiffelroom.org/blog/ted_eiffel/eiffelstudio_less_emissive_on_the_screen#comment-517</link>
 <description>&lt;p&gt;&lt;pre class=&quot;geshifilter&quot;&gt;schoelle@lcp:~$ unzip dark_es_0.zip
Archive:  dark_es_0.zip
  inflating: dark_es.reg
schoelle@lcp:~$ file dark_es.reg
dark_es.reg: MPEG ADTS, layer I, v1, 160 kBits, 48 kHz, Stereo&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;WTF?&lt;/p&gt;

</description>
 <pubDate>Wed, 12 Nov 2008 05:03:35 -0800</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 517 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>expanded classes are neither immutable nor eliminating aliasing</title>
 <link>http://www.eiffelroom.org/blog/maverick/lets_talk_about_strings#comment-516</link>
 <description>&lt;p&gt;it just pushes the problem one step away:&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;geshifilter&quot;&gt;expanded class PERSON
  name: STRING
  set_name (a: STRING) is do name := a end
end&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;geshifilter&quot;&gt;a,b: PERSON -- expanded!
l_name: STRING

l_name := &quot;Bob&quot;
a.set_name (l_name)
b.set_name (l_name)

a.name.append_string (&quot; is a fool!&quot;)
-- b.name has changed!&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The example works as well if you had immutable strings, replace the string attribute with any other mutable attribute.&lt;/p&gt;

&lt;p&gt;A better pattern for immutable classes is procedure-less classes -- no functions, could call them functional classes :) -- which are immutable if CQS is respected (and for which expandedness has no impact, and therefore is of no use).&lt;/p&gt;

&lt;p&gt;The aliasing issue remains the same: aliasing disappears only for transitively functional classes, as it does for transitively expanded classes.&lt;/p&gt;

</description>
 <pubDate>Tue, 11 Nov 2008 10:45:48 -0800</pubDate>
 <dc:creator>nenieorg</dc:creator>
 <guid isPermaLink="false">comment 516 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>What assertions are you</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_of_classes_receiving_an_agent#comment-514</link>
 <description>&lt;p&gt;What assertions are you going to be checking against? At the moment, we have no way of specifying any assertions.&lt;/p&gt;

&lt;p&gt;And  how do you make a library like FACTORY (or a routine like do_all) correct? My proposal addresses that directly.&lt;/p&gt;

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

</description>
 <pubDate>Thu, 16 Oct 2008 23:23:24 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 514 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>What I&#039;m saying is that</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_of_classes_receiving_an_agent#comment-513</link>
 <description>&lt;p&gt;What I&#039;m saying is that whenever you can, you evaluate a precondition at compile time during the agent creation. If not you do it at runtime. Of course not all the assertions can be verified (like the one involving an attribute), but you can easily verify the ones for which it involves one of the closed operands. In both cases, you get the precondition violation much earlier than at agent call time and getting a correctness violation earlier is always better.&lt;/p&gt;

&lt;p&gt;My proposal is to help programmers write their routine properly which is I think an issue when you want to use a library and you have no idea on how the library is going to call your agents which what matters. Supplier is for me the one providing the agent and the client is the one calling it; in this definition it is up to the supplier to provide weaker precondition than the one requested by the client.&lt;/p&gt;

</description>
 <pubDate>Thu, 16 Oct 2008 13:37:55 -0700</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">comment 513 at http://www.eiffelroom.org</guid>
</item>
</channel>
</rss>
