Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C is a big 0

Name: Anonymous 2017-08-04 4:47

https://softwareengineering.stackexchange.com/questions/110804/why-are-zero-based-arrays-the-norm

1-based counting was ``the norm'' for thousands of years. Years begin at 1. The Bible counts chapters and verses from 1. Programming languages before C started arrays from 1 or a user-defined index.

Only a few answers mention that some programming languages let you start from 1. This should be filled with answers saying ``1-based arrays used to be the norm and C hackers came along and forced everyone to use the C way because they get confused if you let them choose the index.'' Stupid questions do not bother me, but wrong answers do. Stack Overflow and Stack Exchange are spreading wrongness into the world. They are reducing the amount of truth on the Internet.

They all say that arrays count from 0 and nobody can change it because it would ``confuse'' people. This is the C mentality. They want to force their 0 on thousands of years of human history and on every non-C-based programming language. They want everyone else to cater to them because they are too dumb. Pascal programmers can learn and use C. They don't like it, but they can get used to it. C programmers don't want to use Pascal because it's not C.

Stop catering to the idiots. They are not good programmers if they get confused by simple concepts like array base. Kids using QBasic and Pascal can understand it, but these C ``expert hackers'' can't. We should stop dumbing down our languages and debasing important computer science concepts because some people are stupid.

Name: Anonymous 2017-08-05 1:49

C arrays are not ``hard to understand". C for loops are ``hard to understand", making one of the most common array tasks (iterating over an array) confusing and leading to off-by-one errors and buffer overflows. The intent of the C for loop syntax is to make it ``versatile", by allowing the initialization, test condition, and increment condition to be terminated. However, it makes the most common loop format (iterating by 1 over an integer range) needlessly complex for humans to parse, and while it does allow less common loop structures, it's more readable to just use explicit ifs and gotos. The Pascal and BASIC loop syntaxes are more intuitive, and the use of goto can be used to handle less typical cases.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List