[Tutor] Here's something to talk about
Weidner, Ronald
RWeidner at ea.com
Wed Apr 15 21:21:23 CEST 2009
I must confess I do not really understand your intent
(a) with the code itself
(b) with the fact of publishing it
Maybe I have read it too fast. What I saw is an implementation of strict object interface, in the sense strictly separating the inner and outer parts of an object. Sure, this is an aspect of OO. But AFAIK this is not very pythonic, not very common at least (and I personly do not feel attracted by this coding style -- rather I consider it a useless overload).
For code security reasons? You may be interested in the concepts of the so-called "Object-capability model": http://en.wikipedia.org/wiki/Object_capability_model.
--
It's ok not to be attracted to the code or the concept. It's not for everyone (or perhaps it's not for anyone). Thanks for the link. That was an interesting read. Let me confess my intentions. I enjoy programming and I also enjoy talking about programming, and sharing ideas. That's it.
The problem that coding in this style tries to solve is change and evolution. During the evolution of software many things can change. Including the things we sometimes take for granted when we start a project. Like the input and output of the program. This example shows how cobbling a few objects together can produce some very different results with very little logic change.
There are better more generic ways to solve these problems. Probably even more pythonic ways to solve them. I hope to discuss them in this thread.
--
Ronald Weidner
More information about the Tutor
mailing list