On Tuesday 20 January 2009 09:52:01 pm Paul Rubin wrote:
> Luis Zarrabeitia <ky...@uh.cu> writes:
> > > Whaat?  Assuming a program is perfect unless a failure is proven
> > > is not at all a sane approach to getting reliable software.  It is
> > > the person claiming perfection who has to prove the absence of failure.
> >
> > No, no. I meant that if pylint works as its specification says it would.
>
> Oh, I see.  Well, that would be ok, except Pylint is not specified as
> detecting the types of access that Russ is concerned with.  It can't,
> for example, flag uses of setattr that might affect a particular
> class.  That would take something a lot fancier.

True.
And I doubt that the C++ compiler will flag the pointers running wildly 
pointing to random memory addresses and accessing the data in there. I doubt 
that pointer will 'respect' the 'private' keyword. I also doubt that the C# 
or Java _compiler_ will prevent you from using reflection somehow to access 
that data.

But somehow the discussion shifted from an optional requirement (giving you 
the chance to explicitly use 'from lock import unlock; o = unlock(obj)') 
to "it can't be done _ever_" (using setattr/getattr is as explicit as your  
analogous 'unlock' function).

Btw, the correctness of a program (on a turing-complete language) cannot be 
statically proven. Ask Turing about it.

-- 
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to