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

Dear GOTO Supporters,

Name: Anonymous 2010-12-10 14:42

You advocate GOTO because of the single use case: nested resource cleanup. You only focus on this, lone, "good" example.. none of the bad points, you are short sighted. Your short sight prohibits moving on to better control structures. Your type is the same as those that claim stem cell research is immoral on religious grounds, ignoring the fact it could save millions of lives. I hate you.

Name: Anonymous 2010-12-10 20:14

apart from nested loop breaking,  the other scenario where i like it is when using some library that involves getting various things which need to be released.

eg

int foo() {
  int n;
  bitch_t bitch;
  cunt_t cunt;
  clit_t clit;

  n = cuntlib_get_bitch(&bitch));
  if(n) {
    printf("get bitch error");
    goto end;
  }

  n = cuntlib_get_cunt(&bitch,&cunt));
  if(n) {
    printf("get cunt error");
    goto freebitch;
  }

  n = cuntlib_get_clit(&cunt,&clit));
  if(n) {
    printf("get clit error");
    goto end;
  }

  cuntlib_rub_clit(&clit);

freeclit:
  cuntlib_release(&clit);

freecunt:
  cuntlib_release(&cunt);

freebitch:
  cuntlib_release(&bitch);

end:
  return n;
}


the way non-goto users (eg MS sample-writers) would do this is to have a big clusterfuck of nested ifs which looks ugly as your mother in the morning.

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