Thread: Why I hate c
View Single Post
  #52   Spotlight this post!  
Unread 18-03-2004, 17:00
meatmanek meatmanek is offline
Programmer/physicist/mathematician
FRC #0868 (TechHounds)
Team Role: Programmer
 
Join Date: Mar 2004
Rookie Year: 2004
Location: Carmel, Indiana
Posts: 142
meatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to behold
Re: Why I hate c

If you really want to see some obfuscated C code, there's actually a contest for it. http://www.ioccc.org/ - The International Obfuscated C Code Contest.

Winning entries can be found at http://www1.us.ioccc.org/years.html

If you want a language that is very easy to program in and makes sense, check out Ruby at http://www.ruby-lang.org
For example, to run a command 3 times in C, you would do this:

for (int i=3; i<=0; i--) {
command();
}

In Ruby, it would look something like this:

3.times { command }

Ruby is also loosely-typed, meaning you don't have to worry about the size of the variable that's holding your data, the interpreter will determine that for you.

Note that you can't use Ruby on the robot, this is just for hobbyist programmers.