[Edu-sig] Properties use case
mtobis at gmail.com
Sat Mar 18 01:39:44 CET 2006
Thank you for a refreshingly terse and substantive comment! Let's have
more of those!
On 3/17/06, Scott David Daniels <Scott.Daniels at acm.org> wrote:
> ajsiegel at optonline.net wrote:
> > Instead of having my geometric objects of the complex plane *be* complex numbes,
> > there is certainly the solution of having a complex number as an attribute of these objects -
> > and then I can take more your approach, and at the speed of C, since I would then
> > be using the built-in for arithmettic operations.
> > There remained something unsatisfying to me about that approach.
> > Until something blows up about my current approach, I am quite happy with it.
> The thing that typically blows up is when you are (for example)
> computing with a complex number that is changed halfway through
> the computation by another thread (say a mouse drag). The square
> root winds up being neither the square root of the original number
> nor of the new changed number. Further, it becomes dicey to
> try to prove that your square root function will always terminate
> (a step size from one that is guaranteed to settle might be a
> disaster at the new-improved value.
> So, that's why CS people like immutable primitive types.
> -- Scott David Daniels
> Scott.Daniels at Acm.Org
> Edu-sig mailing list
> Edu-sig at python.org
More information about the Edu-sig