Better HN
topnewbestaskshowjobs
Log inSign up

4dd3r

5 karma · joined Jan 15, 2012 (14y ago) · 7 submissions

Submissions

comment 14y ago · link · parent

I use goto all the time, but only for one coding pattern. It's a very powerful pattern, which allows me to do memory cleanup completely on a per-function basis:

int abc(void *ctx) { int rc = -1;

  if (outcome_of_first() != SUCCESS) {
    my_log(MY_LEVEL, "Log my error");
    goto over;
  }

  if (outcome_of_second() != SUCCESS) {
    my_log(MY_LEVEL, "Log my error");
    goto over;
  }

  ...

  rc = 0;
over: if (something_allocated != NULL) free(something_allocated);

  if (something_else_allocated != NULL)
    free(something_else_allocated);

  return rc;
}

comment 14y ago · link · parent

haha - this is classic!

3.

Twitter just broke through 500 million users(wewillraakyou.com ↗)

1 points · by 4dd3r · 14y ago · discuss

comment 14y ago · link · parent

That's true. They have managed boost it in the past two years, but the amount of active users are still only in the region of 100 - 150 million.

5.

Twitter will exceed 500 million users on Wednesday(wewillraakyou.com ↗)

3 points · by 4dd3r · 14y ago · 2 comments

comment 14y ago · link · parent

My (slightly altered) version: http://nul.co.za/freedom.txt