Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

YOU CHOOSE!

Name: Anonymous 2006-04-11 0:48

Java... or Python?

Name: Anonymous 2006-04-12 12:13

>>31
Of course it's vital to separate the inside from the outside, but you seem to be spoiled by Java and fail to realize in Python properties should be and are part of the interface of your classes. You rarely need to change what they do in the future or add dependent properties (it's questionable that you ever need too), and if you do, you can define __getattr__ and __setattr__ . In fact, defining these is about the same trouble as defining methods, only you don't have to do them until you really need it. And once again, if you really hate this, why not make the fucking accessor methods anyways? It's not like you're forced to not use them.

>>32
Ruby has come up with a good solution for that, but you fail to realize you don't even need to bother with accessors until you discover you screwed up and need to change some property you exported or hook some behaviour to it; then all you need is to override dot.

As for creating accessors automatically, you can do that in Python too because it's a reflexive language.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List