On Jan 23, 6:21 am, Steve Holden <st...@holdenweb.com> wrote: > I have to say that I thought the example was somewhat bogus. Any > development team that is even slightly concerned about the possibility > of logic bombs in the code will try to mitigate that possibility by the > use of code inspections.
Of course they would, but that does not mean that access restrictions enforced by the language are not prudent. Consider a corporation that needs to maintain the physical security of their buildings. You can say that locks on the doors are not sufficient. Of course they're not. Security guards are needed too -- but that doesn't mean the locks are not needed too. The locks may be *insufficient* by themselves, but they are certainly not *unnecessary*. Ditto for the enforced encapsulation for large financial or safety-critical projects. > I'm not sure that there's much to be gained by this level of dogmatism > on either side. "Enforced encapsulation" has been "implemented" in both > C++ and Java, and both have proved to be circumventable. Just the same, > talk of "clueless pointy-haired bosses" is unlikely to be convincing. > Even the pointy-haired types never recognize themselves as such. Do you think the designers of C++, Java, Ada, and Scala would eliminate the enforced encapsulation if they had it to do over again? Of course not. The vast majority of the users of those languages consider it a major plus. And those who don't wish to use it aren't forced to use it except perhaps by their bosses or their customers. Again, I am not saying that Python necessarily needs enforced access restriction. I'm just saying it would be a plus if it can be added without compromising the language in some way. -- http://mail.python.org/mailman/listinfo/python-list