C: anything by antirez (redis, etc...) Redis is the epitome of well written understandable C. Ruby: anything written by _why (if you can find the source) He once gave a whole presentation on the splat operator and it's bizarre uses that gave me goosebumps. A true artist. The code twists and contorts ruby in unimaginable ways. JS: anything written by TJ hollwaychuck (express, mocha, etc...) Express is so simple but po…
>C: anything by antirez (redis, etc...) Redis is the epitome of well written understandable C. The first file I opened has 3 gotos but maybe it's pure randomness... ;p
void foo() {
int* foo = malloc(...)
if (foo == NULL) goto err_foo;
int* bar = malloc(...)
if (bar == NULL) goto err_bar;
/* code */
err_bar:
free(bar);
err_foo:
free(foo);
}
That's a use of goto that's often considered non-evil, probably because the alternatives are typically a lot more ugly.