Subject: Re: packet capturing
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 01/21/2004 15:11:32
--Apple-Mail-13--217272077
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On Jan 21, 2004, at 3:08 PM, Jonathan Stone wrote:

> One or two parameters, maybe the ad-hoc thing isnt so bad.  A
> half-dozen or a dozen or more? No thanks, that way lies a morass of
> ad-hoc ``have I been initialized yet?''  flags. Which leads
> inevitably, to maintenance bugs, when someone updtes some
> but not all of the constructors, or adds new uses  without an
> ``am I initialized yet? check.   YMMV, but thats my experience.

Actually, a "once" construct would do the trick nicely.

> I happen to think Perry's right: we could do with an initialization
> framework.

But then you must always be concerned about ordering issues.  If you 
always do it lazily, you don't ever need to concern yourself with 
ordering, because, if something is asking for it, then it's fairly safe 
to assume that you have the information required to compute it.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>


--Apple-Mail-13--217272077
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFADwckOpVKkaBm8XkRArRDAJ4nsu3JrG3YSd7LrBWuC/3FM55qlgCggVOm
4By+zXEvH2kj/Q5g/40PJJs=
=TMTf
-----END PGP SIGNATURE-----

--Apple-Mail-13--217272077--