Ed Leafe wrote:
>> Another slight pro to my way is that if you never refer to a given
>> property, the attribute never gets defined, as opposed to perhaps
>> defining unneeded attributes when the class is instantiated.
> 
>       That sounds like micro-optimization at the expense of legibility. A  
> little too much "magic" for my taste.

Whether or not there's an underlying attribute is magical?


>> And what is gained by defining the property attributes 'up above'? I
>> have to reject the ability to comment on their use, as that would be
>> self-explanatory from within the property definition.
> 
>       It's simply a matter of style. For me, it's cleaner to define things  
> up front; perhaps it's a holdover from years of long LOCAL statements  
> at the top of every VFP method I wrote. It's probably also a habit I  
> picked up before we settled on the Dabo practice of property-centric  
> development; in most of the Python world, it's common to define a  
> plain attribute, and only property-ize it when necessary, as opposed  
> to the Java-like practice of having to write get/set for everything.  
> It's also dead simple to do, since my TextMate macro creates the  
> declaration along with the property definition and get/set code.

Attributes are just fine and usually more appropriate than properties 
for things that we aren't exposing to the public API. Our public API 
differs from much of the Python world by exposing properties instead of 
attributes, but as long as we are consistent within our project I think 
it is okay. Properties are relatively new to Python, after all (only a 
little bit older than Dabo).

There are plenty of other things we do inconsistently with "normal" 
Python. I don't worry about it.

>> But this isn't really worth arguing about, either.
> 
>       I'm enjoying this, actually. For once it isn't devolving into an  
> argument.

I always enjoy our arguments; I don't like it when it gets overheated 
over minutia, and/or one party or the other doesn't appear to be 
listening to what the other one is trying to say (overly defensive).

In this case, while the argument is interesting, the end decision (if we 
come to one) doesn't really matter that much and we should just code in 
the style we want.

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to