News for hackers. Stuff that matters.
Re:Ways to get screwed by C by alexgartrell on Thursday December 09, 2010 @11:01PM (#1990549)
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).

Re:Ways to get screwed by C by alexgartrell on Friday December 10, 2010 @01:09AM (#1990822)
(the author goes on to complain about how the value ought to be whatever fn(a->x,b->x) returns)*

That was bad.

Re:Ways to get screwed by C by tedunangst on Friday December 10, 2010 @11:05AM (#1992034)
Funny that you mention it. JavaScript "the bad parts" is a serious contender in the bad language arena.