[Edu-sig] Properties use case

Arthur ajsiegel at optonline.net
Sat Mar 18 21:35:34 CET 2006


 

> >-----Original Message-----
> >From: Laura Creighton [mailto:lac at strakt.com] 
> >Sent: Saturday, March 18, 2006 3:01 PM
> >To: Arthur
> >
> >I'm confused too.
> >
> >It sounds to me that you want to invent your own type.  Does 
> >your type have any relationship to the complex numbers that 
> >we know and love, or do you just want a type that has 2 parts?  
> >
> >In particular, check out:
> >http://home.scarlet.be/~ping1339/complget.htm#Polar-representation
> >
> >Do you want this 
> >
> >a + ib = r (cos(t) + i sin(t))
> >
> >to be true for your type as well?  I think so.

Isn't the creation of any class the creation of one's own type? Now what am
I missing now? 

My class - unless I am missing something else - does complex mathematics
exactly as does the built-in type. But it is now the Complex type, say.
Which allows me to say a=Complex(5,3) on creation, and a.real = 6 somewhere
down the line. Obviously notation ally, a=5 +3j will still return the Python
immutable built-in type. Which is fine by me.    

That's exactly why I am having so much trouble with the problem I seem to be
causing here. I understand next to nothing about threading, but can't
understand why this particular class is any less safe than any other class
one might create and use. 

Use cases?

Seems to me to be a totally separate and different issue. One that, for
example, Michael was skeptical about from the beginning.  But that really
doesn't seem to me to be what the discussion has been about - at least the
discussion that others seem to want to have.  

>From the use case point of view, I have retained my own skepticism, as I
tried to make clear.  I had my reasonable reasons to go in that direction, I
think.  But there wasn't any really, really deep soul searching, precisely
because there didn't seem to be anything at all unusual about the idea of
this kind of class compared to others I might create and use as a matter of
course -  despite that there was a similar built-in.

But no, *don't* like to give up performance, and have been happy to have had
a discussion that led me to a possible alternative that is prettier, *and*
faster. 

Ain't Edu-sig cool ;)

Art




More information about the Edu-sig mailing list