Spec#, nullables and more

"Jérôme M. Berger" jeberger at free.fr
Sun Nov 7 01:35:39 PST 2010


Walter Bright wrote:
> 
> Very, very few (if any) dmd issues on bugzilla would have been caught by
> ranged integers or non-null pointers (despite there being several seg
> fault bugs).
> 
> The vast majority of the problems were the result of an incomplete
> understanding of how things should be done, rather than a coding error.
> (A coding error being things as simple as a typo or forgetting to
> initialize something, aka "stupid mistakes".)
> 
> I think that's in no small part due to my programming for a very long
> time, and I've developed all kinds of strategies for avoiding the
> "stupid mistake" kinds of coding errors.
> 
> As Andrei suggested out to me, and I agree, the notions of non-null
> types, ranged integers, and the like's primary advantage is not in
> reducing the bug count, but in enhancing the self-documenting nature of
> the code. It makes the code easier to reason about, and easier to modify.

	Do you consider yourself an average programmer? I wouldn't. You say
it yourself: you have a lot of experience at avoiding "stupid
mistakes" and the same probably goes for Andrei as well. The vast
majority of programmers out there are not at that level (in fact, I
would venture a guess that the average level of the people who
participate in this newsgroup is way above the global average). As
someone who has some experience in managing beginner programmers,
I'm pretty sure that non-null pointers and ranged integers would
reduce the bug count *for the average programmer*.

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101107/c9215f42/attachment.pgp>


More information about the Digitalmars-d mailing list