News for hackers. Stuff that matters.
Re:Isaacs: try/catch is an anti-pattern by regularfry on Monday November 14, 2011 @03:09PM (#3235472)
No, the way to handle that pattern is with nested gotos:

    a = acquire(A);
    if (!a) goto err_a;

    b = acquire(B);
    if (!b) goto err_b;

    c = acquire(C);
    if (!c) goto err_c;

    do_stuff(a,b,c);

  err_c:
    release(b);
  err_b:
    release(a);
  err_a:
    return;
This is precisely why goto is not universally evil.
Re:Isaacs: try/catch is an anti-pattern by gue5t on Monday November 14, 2011 @09:53PM (#3236777)
Consider:

  a = acquire(A);
  if (a)
  {
  	b = acquire(B);
  	if (b)
  	{
  		c = acquire(C);
  		if (c)
  		{
  			do_stuff(a,b,c);
  		}
  		release(b);
  	}
  	release(a);
  }
  return;