if <assignment>:

Paul Wright -$P-W$- at verence.demon.co.uk
Wed Nov 27 08:12:15 EST 2002


In article <as1mos$dkg$1 at wheel2.two14.net>,  <maney at pobox.com> wrote:
>Paul Wright <-$P-W$- at verence.demon.co.uk> wrote:
>> This is a regular question on comp.lang.python.
>
>Yes, it does seem to cause new-to-Python programmers a fair bit of
>confusion, doesn't it?  Everything is going along so nicely, then you
>hit a block of code where you want to do this really very simple thing,
>and all of a sudden Python is being less helpful than C.  Of course tou
>find this worthy of comment: it's so unusual!

It's unusual for C (and other C like languages) people who come to
Python after C. I don't think that it's worth changing Python for this,
though.

>You might want to read Hatton's description of that again - the
>accurate one in chapter four, not the wooly one earlier on.  He makes
>it quite clear that the statistics merely count the occurences of
>patterns he considers error-prone, not actual errors per se.

Indeed: chapter 4 talks about non-conforming code, I see. He considers
these items of code faults, which may or may not lead to failure. I
shall stop quoting that as a failure statistic, then.

>Some of the occurences may be errors, but Hatton provides fuck-all in
>the way of hard data on that score.  That lack was, I think, the main
>reason _Safer C_ has been stuck on a back shelf all these years...
>though the fact that I've been moving away from using C so much over
>those years must be a factor as well.  :-)

My own personal feeling is that this is a moderately common error
(though think I tend to make it more often in Python than in C, for some
reason). It might be related to experience, but I also think some people
just have a blind spot for that error (maybe those of us who grew up
writing BBC BASIC :-).

>None of which should deter anyone who has to use C from reading _Safer
>C_, for there is a great deal of merit to it.

That book is quite dull compared to the course he gives, which is very
entertaining and worthwhile for anyone doing safety related stuff with
C.

-- 
Paul Wright | http://pobox.com/~pw201 |



More information about the Python-list mailing list