Re: two xasserts in squid3

From: Adrian Chadd <adrian@dont-contact.us>
Date: Mon, 11 Feb 2008 10:26:22 +0900

On Mon, Feb 11, 2008, Amos Jeffries wrote:

> FWIW the keyword 'typedef' is as evil in C++ as #define, and only 'goto'
> is worse (and completely unnecessary since functional-C deprecated
> pascal).

Goto is fine. You just need to know how and when to use it.

My use of goto in new Squid C code I write is purely to unwind whatever
stuff has been allocated/locked in the function before I exit. That way
I end up with -one- exit location in the function and I don't have to
bum around using extra functions or massively nested conditional
constructs to achieve it. In fact, I've used goto in a few places to
tidy up the code..

Adrian

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
Received on Sun Feb 10 2008 - 18:14:11 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST