On Sat, Dec 31, 2011 at 10:39 AM, Roy Smith <r...@panix.com> wrote:
> In article <mailman.4256.1325288188.27778.python-l...@python.org>,
>  Chris Angelico <ros...@gmail.com> wrote:
>
>> You know a Python programmer's been at your C++ code when it opens:
>> #define class struct
>
> Why stop there?
>
> #define private public

Probably yeah, do both. Anyway, life's so much easier when you don't
have to write trivial getter/setter methods (and then maintain them).
I've never had a situation where I've changed a private member while
keeping the getters and setters unchanged; the ONLY benefit accessor
methods have ever given to me personally has been logging (and
granted, that is hard to do without them - since you can't override
__getitem__ in C++ - but how often do you really need that facility?).

I used to believe in the separation of interface from implementation.
Then I realised that most of the separation was transparent anyway,
and gave up on it. And then realised why the separation is a good idea
after all. :)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to