<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/38459</link>
    <title>MATLAB Central Newsreader - Re: Dijkstra has died, and &quot;Why Numbering Should Start At Zero&quot;</title>
    <description>Feed for thread: Re: Dijkstra has died, and &quot;Why Numbering Should Start At Zero&quot;</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 15 Aug 2002 11:10:48 -0400</pubDate>
      <title>Re: Dijkstra has died, and &quot;Why Numbering Should Start At Zero&quot;</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/38459#97535</link>
      <author>Stan Pawlukiewicz</author>
      <description>robert bristow-johnson wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; AJ \&quot;no z\&quot; Johnson wrote:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &quot;Steve Amphlett&quot; &amp;lt;samphlett@ricardo.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; news:2ae8f62b.0208140017.65bb9cd3@posting.google.com...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Oh well guys, the thread's now four days old and still no TMW&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; chippers-in!  Do you reckon they're developing their killer argument?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Or are they just sitting pretty, knowing that their obviously flawed&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; product has market share on its side?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; - Steve&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; ...or maybe they are too busy adding an &quot;Index Origin&quot; property to array&lt;br&gt;
&amp;gt; &amp;gt; constructs. One can only hope. I hope it's obvious which court I'm in.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; it's nice to feel less alone.  when i first brought this up, it seemed&lt;br&gt;
&amp;gt; like everyone, except a few comp.dsp regulars, thought i was goofy.&lt;br&gt;
&lt;br&gt;
Now, who... would think that. ;)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Responding to this and the another thread, here in one place.&lt;br&gt;
&lt;br&gt;
Take a look at Python.  I haven't played with 2.2, but in 1.5 and with&lt;br&gt;
numpy, there is a distinction between an array(n) and a&lt;br&gt;
array(n,1).  You can also have an array with indicies&lt;br&gt;
&lt;br&gt;
a('bob', 'ted', 'carol', 'alice') &lt;br&gt;
&lt;br&gt;
&amp;nbsp;if you want.  The iterator in this case brings a few ideas to mind, but&lt;br&gt;
I won't go there.&lt;br&gt;
&lt;br&gt;
It seems like you would like something of the flavor of an associate&lt;br&gt;
memory.  &lt;br&gt;
&lt;br&gt;
In terms of matricies, zero base indexing might be a bit cleaner in&lt;br&gt;
terms of notation for cyclic objects i.e.  a( mod(i,N))  &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; This being the first indexing thread that *I've* read, I am curious what&lt;br&gt;
&amp;gt; &amp;gt; other languages support definable indexing origins?&lt;br&gt;
&amp;gt; &amp;gt; For sure:&lt;br&gt;
&amp;gt; &amp;gt; - Maple (don't know much about it, though)&lt;br&gt;
&amp;gt; &amp;gt; - Pascal, IIRC&lt;br&gt;
&amp;gt; &amp;gt; - APL (choice of 0 or 1 only)&lt;br&gt;
&amp;gt; &amp;gt; - C (array indexing is so loose that one can implement non-zero based&lt;br&gt;
&amp;gt; &amp;gt; indexing, but it is geneally considered bad coding practice)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; i don't consider it bad coding practice, at all.  i used to do this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; double _my_dummy_array1[1024];&lt;br&gt;
&amp;gt; double my_array[1];&lt;br&gt;
&amp;gt; double _my_dummy_array2[1024];&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for (k=-1024; k&amp;lt;=1024; k++)&lt;br&gt;
&amp;gt;         {&lt;br&gt;
&amp;gt;         do_something_with( my_array[k] );&lt;br&gt;
&amp;gt;         }&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ****but i was thoroughly chewed out for that since there was no way to&lt;br&gt;
&amp;gt; guarantee that the compiler would put the arrays together like that.&lt;br&gt;
&amp;gt; but if you do:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; double *_my_dummy_array = (double *)malloc(2049*sizeof(double));&lt;br&gt;
&amp;gt; double *my_array = _my_dummy_array + 1024;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for (k=-1024; k&amp;lt;=1024; k++)&lt;br&gt;
&amp;gt;         {&lt;br&gt;
&amp;gt;         do_something_with( my_array[k] );&lt;br&gt;
&amp;gt;         }&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ****that should be perfectly acceptable coding practice.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I think Mathworks has gone a long way to meeting customer demands, which is&lt;br&gt;
&amp;gt; &amp;gt; why it's such a comprehensive product now. If only they'd add *my* stuff...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; elegance, consiseness, and simplicity is more important to me than&lt;br&gt;
&amp;gt; everything with the kitchen sink.  i use very few of the huge set of&lt;br&gt;
&amp;gt; MATLAB functions.  i just want them to work correctly.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; r b-j&lt;br&gt;
&amp;gt; rbj@surfglobal.net   a.k.a.   robert@wavemechanics.com&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Don't give in to the Dark Side.  Boycott intel and microsoft.&quot;</description>
    </item>
  </channel>
</rss>

