On Mon, 18 Dec 2006 05:19:49 +0100, <//[EMAIL PROTECTED]>> wrote:

> [EMAIL PROTECTED] writes:
>> So don't (poke (random) value).  That would be obvious to anyone
>> capable of writing a device driver in C or Lisp or Oberon or ....
>
> Similarly in C programs, don't do
>
>   *random = 0;
>
> Avoiding that is easier said than done.  C programs suffer endless
> bugs of that type.

Don't know where you get that idea.
I have used a bounds checker in C++ since 1990..
If I set a pointer to a space on the heap that isn't allocated
I would get a error. If I forgot to deallocate it it would
warn me when the program terminates. Then I just jump to the place
in the file where the memory reference was allocated. Admitably
it could be a great problem if such tools weren't available, but that  
hasn't
been the case in years.
Much worse are buffer overflow errors. Functions that don't check buffer
constraints. But then most modern compilers can turn that on too.
Wanna overwrite the return stack. A cookie at the end checks for this
as well.
As for old libraries like string(s) modern replacement's are available
that check constraints. For that matter C++'s type checks are much stricter
than C's.
In fact it hasn't been much a problem for a long time.

(Debugging template error's now that is a pain..)

Incremental linkers and fast compiler time also makes incremental  
developement
possible.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to