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

February 2026

S M T W T F S
1234567
891011121314
15161718192021
22232425262728

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 2nd, 2026 11:17 am
Powered by Dreamwidth Studios