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

Most C programmers are faggots

Name: Anonymous 2012-01-29 19:36

I'm getting really irritated at a lot of self proclaimed C programmers for abusing the fuck out structures and pointers. It's easy to get out of hand and make your code look like shit and it seems people want to do it even when it's not necessary. The problem is even a lot of legitimately experienced C programmers do the same shit. Go look at the source to your favorite software written in C.

A good example is that stupid dubs checker thread that faggot just made. It should be written like this


#include <stdio.h>

#define base 10

int check(int i, int b) {
  return(i%b == (i/b)%b);
}

int main(void) {
  int i = 1;
 
  while(i++ < 100)
    if(check(i, base))
      puts("nice dubs bro");
     
  return(0);
}

Name: Anonymous 2012-01-30 6:41

I was just about to commend /prog/ about how its quality has improved over the last few days. Ah well.

>>1
While I get what you are saying, using pointers over array subscripts actually tends to give you a slight boost in performance.

There is definitely a tendency to get away from the UNIX philosophy of keeping everything as simple as it can be while achieving optimal results, where complex mechanisms are used for the simplest of tasks, but I think pointers are needlessly feared.

Likewise, prototypes are important for reusability. If anyone were to reuse your dub-checker the lack of prototypes would turn off all type-checking for external calls. This is bad.

>>3
They are key words, my dear troll. Go ahead and try to make a function named if.

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