From: Andrew S. <ans...@se...> - 2002-01-26 21:03:25
|
On Friday 25 January 2002 05:06 pm, Chris Cannam wrote: > Andrew Sutton wrote: > >>I could do with a good rule of thumb for when to declare a method > >>to expect reference arguments and when pointers, though. Hmm? > > > > rule of thumb: if getting a null pointer would result in catastrophic > > failure, use a reference (as they can't be null). > > Yeah, and use pointers when you want null to mean something. > But that still leaves large categories of inconsistency where > either will do but different programmers use different things. right. my works policy is: use a reference unless you can justify using a pointer. that's fun to work with :) andy |