3 ms·
I think the problem is that a lot of languages encourage you to do something clever, whereas C actively and relentlessly punishes you for being clever. My favo
by alexgartrell 16y ago
I think the problem is that a lot of languages encourage you to do something clever, whereas C actively and relentlessly punishes you for being clever.
My favorite example is from #19, which is something that javascript programmers do all of the time.
int value = a && b && fn(a->x,b->x);
(The author goes on to complain about how value you obviously be whatever fn(a->x, b->x) returns).
In javascript, that's actually good practice (I guess, I had a mentor once who encouraged it, but I never really bought into it). To a C programmer though, that just looks gross. (Or at least to me, and I like to pretend to be a C programmer).
- alexgartrell 16y ago(the author goes on to complain about how the value ought to be whatever fn(a->x,b->x) returns)* That was bad.
- tedunangst 16y agoFunny that you mention it. JavaScript "the bad parts" is a serious contender in the bad language arena.