Wus Posted April 29, 2009 Posted April 29, 2009 I will be honest, it is clear that this discussion is going nowhere. Instead of an educated debate about the pro's and con's of 0 and 1 based arrays, I find the author clearly does not understand the idea of debate and instead (implicitly albeit) attacks the readers with "The issue here, I fear, is one of entrenched views, and a cultlike reverence for textbooks." I'd be happy to debate something, but I don't like being personally called a 'mindless drone' (to paraphrase)--I personally don't give a flying fuck about what the textbooks say... my points of view are my own, with their own merits. Fuck you. Wus out.
Valik Posted April 29, 2009 Posted April 29, 2009 OK, I tried to raise this as a sensible discussion topic, and all it generated was a series of ad-hominem attacks.See, here's the thing about an ad-hominem: You have to start with something a little more substantial than hyperbolic opinion before any of the "attacks" can be considered ad-hominem.Why, I ask? Is this any different from debating whether to use a beige or black case? Or between Athlon and Pentium? On the face of it, no.On the face of it all debates are the same. It's the details that matter and in this case the details do matter so your comparison is pointless.Actually, yes there is. Zero-based arithmetic is a cornerstone of college and uni computer-science courses, and I reckon the issue here is nothing to do with advantages or disadvantages, but of going-against the time-honoured and revered writings of those with strings of letters after their name. Of challenging 'status quo' in a way which might be seen as <gasp> heresy.Or maybe it's not a problem? There's always that, too. But I guess it's more fun to take a contrarian point of view and then try to blame other people's insistence on their point of view as being stuck adhering to some dogma.The issue here, I fear, is one of entrenched views, and a cultlike reverence for textbooks.The issue here is that you have a problem with something that isn't a problem. I can freely go from one-based or zero-based without even thinking about it. That's the key, I don't have to think about it. Maybe you should try to reach a level where you think less and do more. It'll lead to less bitching.The short of it is you have a problem with something nobody else gives a damn about. Call it the status quo with all it's negative connotations if you wish. The fact is, there is nothing wrong with the current way things are done. Most of us don't pay attention to it. Most of us realize that all your examples are just demonstrations of poor programming unrelated to your core issue. Most of us realize that offsetting indices is going to happen no matter what it starts at. If it's not broke, don't fix it.
GEOSoft Posted April 29, 2009 Posted April 29, 2009 This one keeps coming up time and agin but it's about as pointless as the debate about Message loops Vs. OnEvent. Whichever side your on is going to be wrong to someone. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Anteaus Posted May 6, 2009 Author Posted May 6, 2009 This one keeps coming up time and agin but it's about as pointless as the debate about Message loops Vs. OnEvent. Whichever side your on is going to be wrong to someone.Agreed.Though one point I would add is that the issue of consistency of method favours indexing from one. Of the languages which purportedly index everything from zero, none does so with total consistency. For a trivial example, many zero-based compilers will reply "Syntax error in Line 15" - which should in fact read Line 14, except that the author evidently fell-back into the habit of counting from one that time, probably without even realising it. This inconsistency even affects hardware, with the nonsensical situation where hard-disk cylinders and sectors are differently indexed. Since it is evidently not possible -or extremely difficult- to be consistent about counting from zero, then to me anyway it makes more sense to standardise on counting from one, which can be applied consistently.
Anteaus Posted May 10, 2009 Author Posted May 10, 2009 Line number is 15. Line index is 14. .. and I suppose that is a feature, not a... Actually the issues raised are deeper and more problematic than might at first sight be realised. I mentioned that php's stripos() function is documented to give misleading results if you test for (expression)==0, BUT in fact the problems go deeper than the manpage says. If you perform a logical test on its output, such as : if (!stripos($string,$substring)) {[action]}; That also gives anomalous results when the substring is found straightaway. This surely should not happen. No matter what the language-rules are, a straight yes/no test should always return a consistent answer. If it does not, then there is something far wrong. Part of the problem is down-to php's use of untyped variables (which leads to the confusion between zero and false) but the key issue is the return of a zero value in response to a true condition.
Recommended Posts