Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: Why golang doesn't have ternary operator?. Parent comment
x = a ? b : c;
int x = a ? : b : c;
You're often better off if you put it behind a macro:
#define IF(X, Y, Z) ((X) ? (Y) : (Z))
CPP macros is red herring.
You're often better off if you put it behind a macro:
In C coding, a lot of ternary action happens behind the curtain of preprocessing, where expression is almost fully parenthesized.