<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for BitMaster</title><link>http://disqus.com/by/BitMaster/</link><description></description><atom:link href="http://disqus.com/BitMaster/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 14 Aug 2009 06:18:39 -0000</lastBuildDate><item><title>Re: Why The Array Index Should Start From 0</title><link>http://developeronline.blogspot.com/2008/04/why-array-index-should-start-from-0.html#comment-14826714</link><description>&lt;p&gt;I totally disagree...&lt;br&gt;Why does it have to include the index 0? It doesn't make sense...&lt;/p&gt;&lt;p&gt;The subsequence includes the smallest natural number, 0:&lt;/p&gt;&lt;p&gt;i = 0; i &amp;lt;= 0 (from 0 to 0, logical)&lt;/p&gt;&lt;p&gt;The subsequence is empty:&lt;br&gt;i= 0; i &amp;lt;= -1 (from 0 to -1, doesn't find any element)...&lt;/p&gt;&lt;p&gt;I know that I written above -1, but hey, at least you know where it starts and where it stops, not where it starts and the number that is 1 greater than where it stops.&lt;/p&gt;&lt;p&gt;When we are counting, we start counting from 1 and when we end counting, we find out how many items are, not how many + 1.&lt;/p&gt;&lt;p&gt;Furthermore, you always have to keep in mind that you need to subtract 1 when counting the items of an array etc...&lt;/p&gt;&lt;p&gt;I always keep the 0 element empty and use the array from 1. It's an unnecessary effort to try and use it. You always have to remember, to add or to subtract 1, depending on the case, when it could have been much easier.&lt;/p&gt;&lt;p&gt;If you want to declare an empty array, you should have been able to declare it&lt;br&gt;v [0]&lt;br&gt;0 elements, so it's empty, not&lt;br&gt;v [-1].&lt;/p&gt;&lt;p&gt;I know that when you type conditions, you can use "&amp;lt;" instead of "&amp;lt;=", but then you don't really see the exact boundary, but the boundary + 1.&lt;/p&gt;&lt;p&gt;This stuff can be very confusing...-.-&lt;/p&gt;&lt;p&gt;I am an experienced programmer and still, I consider indexing from 0 one of the&lt;br&gt;"Weirdest and confusing standardized notations of informatics"...&lt;/p&gt;&lt;p&gt;I would have granted the possibility to choose both boundaries in every language, or at least toggle using a statement between the base 0 (the popular and confusing one), and base 1 (the more natural and clearer).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">BitMaster</dc:creator><pubDate>Fri, 14 Aug 2009 06:18:39 -0000</pubDate></item></channel></rss>