[Edu-sig] Design Patterns

Kirby Urner urnerk at qwest.net
Thu Aug 25 16:19:34 CEST 2005


> >I think use cases were described, and demonstrated, in which the property
> >feature made sense, e.g. we wanted an attributes-based API into our
> >triangle object, but sometimes the results were computed on the fly.
> 
> And I notice that without the use of properties, that which is computed on
> the fly is identified as such.  So that properties allow us to have an API
> that which is unrevealing on this matter. I am not excited yet.

Yes, you weren't excited by some other software engineer's design.  But
that's different from not seeing a use case (one would hope).  

I don't want my user to care what's "on the fly" in my triangle.  I want to
use attributes for all read-only properties.  Simple and to the point.

Adding () here and not there just clutters the space with irrelevant detail.
I'll tell my user to look at the source code if said user cares that much
about what's "on the fly."

> Yes, I think I understand. *With* properties we can change our mind after
> our API is set in stone and nobody will notice or need to adjust.
> 

That was another use case, not identical to the first (i.e. the case of just
wanting to use attributes, which could easily have been based on properties
right from the start, i.e. there need be no after thoughts).

> So that properties and their use case encourage us to release less
> revealing API's all the time, to cover ourselves in the event we set 
> our API in stone prematurely.
> 

They help us craft less cluttered and stupid APIs yes.  Your idea to have ()
every so often, because it's on the fly -- I don't want that.  My triangle
is not that dumb 'n ugly, sorry (Python supports more than one aesthetic).

> I don't like properties.
> 

I do.

> And certainly no more so from what I have learned from this attempt at
> getting more clarity about them.
> 
> And like to think my naivety on this kind of matter is a purposeful
> naivety.
> 
> Art

You're welcome to your opinions.  Sometimes you whine when it seems your
opinions are taken for what they're worth though, which *sometimes* (not all
the time) ain't much in my book.

Kirby





More information about the Edu-sig mailing list