On Mon, 2013-11-18 at 11:02 +0100, Jakub Hrozek wrote:
On Sat, Nov 16, 2013 at 09:39:36AM -0500, Simo Sorce wrote:
> On Sat, 2013-11-16 at 19:16 +0530, Pallavi Jha wrote:
> > Hello,
> >
> > Please find the attachment below. Kindly review.
> >
> I am not really a fan of these null checks, I prefer the code to crash
> in this case because these functions should never be called with an
> empty context.
It's a matter of style mostly I suppose, but do you prefer the code to
crash even for external facing API?
No.
I agree with you when it comes to internal/static functions.
Yes only internal where we have few entry points and we want to catch
asap programming errors.
I am in general for gracefully degrading, but some parts of the code are
better fall hard immediately IMO.
Simo.
--
Simo Sorce * Red Hat, Inc * New York