<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://eiffelroom.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - Proposed additions to classes INTEGER_GENERAL and CHARACTER_GENERAL - Comments</title>
 <link>http://eiffelroom.com/blog/colin_adams/proposed_additions_to_classes_integer_general_and_character_general</link>
 <description>Comments for &quot;Proposed additions to classes INTEGER_GENERAL and CHARACTER_GENERAL&quot;</description>
 <language>en</language>
<item>
 <title>Alias Validity Rule</title>
 <link>http://eiffelroom.com/blog/colin_adams/proposed_additions_to_classes_integer_general_and_character_general#comment-115</link>
 <description>&lt;p&gt;The prefix operator idea won&#039;t work, because it violates the Alias Validity Rule. See 8. 5. 26 in the ECMA spec.&lt;/p&gt;

&lt;p&gt;This throws a big spanner in the works for Roger Osmond&#039;s objective of making Eiffel more palatable to C punctuation junkies. Sorry, Roger.&lt;/p&gt;

</description>
 <pubDate>Sun, 11 Mar 2007 06:16:13 -0700</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 115 at http://eiffelroom.com</guid>
</item>
<item>
 <title>Proposed additions to classes INTEGER_GENERAL and CHARACTER_GENERAL</title>
 <link>http://eiffelroom.com/blog/colin_adams/proposed_additions_to_classes_integer_general_and_character_general</link>
 <description>&lt;p&gt;Following an article by Roger Osmond &lt;a href=&quot;http://eiffelsoftware.origo.ethz.ch/index.php/Auto-Increment_Proposal&quot;&gt;Auto-Increment_Proposal&lt;/a&gt;, I propose the following additions.&lt;/p&gt;

&lt;p&gt;To both classes INTEGER_GENERAL and CHARACTER_GENERAL, add features successor and predecessor, both queries returning like Current.&lt;/p&gt;

&lt;p&gt;Successor should return an INTEGER whose code is one greater than Current (it must have a pre-condition that code is not the maximum possible for the particular descendant of INTEGER_GENERAL). In CHARACTER_GENERAL, this will return the next character in the Unicode code-point collation (a similar pre-condition is necessary to avoid return a character with code greater than the maximum for the concrete descendant class - in the case of CHARACTER_32, that is the maximum Unicode code-point permitted, NOT the maximum value for INTEGER_32).&lt;/p&gt;

&lt;p&gt;Predecessor is the reverse operation, and has the corresponding opposite pre-condition.&lt;/p&gt;

&lt;p&gt;For characters, the concept of the next and previous character is really a property of a collation. So ST_COLLATOR (or equivalent classes) and its descendants could be enhanced to add next_character and previous_character.&lt;/p&gt;

&lt;p&gt;In class INTEGER_GENERAL only, add mutator routines increment and decrement, with prefix aliases of ++ and -- respectively (I can&#039;t say I really care for these prefix operators, but they won&#039;t do any harm). These routines respectively add and subtract 1 from Current. They will have pre-conditions to avoid overflow/wrap-around effects.&lt;/p&gt;

</description>
 <comments>http://eiffelroom.com/blog/colin_adams/proposed_additions_to_classes_integer_general_and_character_general#comments</comments>
 <category domain="http://eiffelroom.com/tag/ecma">Ecma</category>
 <category domain="http://eiffelroom.com/tag/elks">ELKS</category>
 <pubDate>Fri, 09 Mar 2007 00:47:54 -0800</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">122 at http://eiffelroom.com</guid>
</item>
</channel>
</rss>
