billroper: (Default)
[personal profile] billroper
If you do not check for NULL pointers, you can get away with it right up until the point when the code presents you with one, at which time your code will merrily GPF. I am currently at about line 1400 in someone's 2800 line file, adding in the NULL pointer checks which aren't there at the moment.

Before I finish this, I am going to Sweet Baby Ray's for dinner.

Because I deserve it.

Date: 2009-06-06 10:47 am (UTC)
madfilkentist: My cat Florestan (gray shorthair) (hex)
From: [personal profile] madfilkentist
That's called "design by contract," isn't it? If the caller doesn't provide valid data, the subroutine is allowed to act unpredictably.

As you might guess, I'm not a fan of design by contract.

Profile

billroper: (Default)
billroper

March 2026

S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 22nd, 2026 07:00 am
Powered by Dreamwidth Studios