Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why Lisp is Awesome. Parent comment
$ cat foo.c
#include <stdio.h> main() { const char *foo = "bar"; switch (foo) { case "foo": printf("foo\n"); } }
foo.c: In function ‘main’: foo.c:4: error: switch quantity not an integer foo.c:5: error: case label does not reduce to an integer constant
I'm aware that you can't do this.
I guess my sarcasm didn't translate:)
$ cat foo.c
$ gcc -pedantic -std=c99 foo.c -o foo