[SciPy-user] SciPy Data Analysis Workbench
ggellner at uoguelph.ca
Sat Jan 20 14:01:28 CST 2007
Does using traits change from a Duck typing solution to a static
typing (type checking) solution?
I have to admit I am vague on these issues, but all the books I have
learned python from go crazy about not doing type checking (they say
over and over that python is strongly typed, but not statically typed
. . . and you should use duck typing not type checking).
Having a fortran background I miss a lot of the subtly of this, but I
worry about not using pythonic code, as I am trying to change my old
programming habits (hopefully the new ones are better . . .).
Does traits suffer this problem?
As from what I have read (as a previous fortran programmer) I find
traits very, very intriguing (especially the easy generation of a gui).
On Sat, Jan 20, 2007 at 08:18:53PM +0100, Gael Varoquaux wrote:
> On Thu, Jan 18, 2007 at 07:02:13PM -0500, val wrote:
> > My first impression of traits was its help in its structured
> > description and manipulation of physical properties of real-world
> > objects, a very important (and missing in Python?) component of
> > physics-related programming.
> > How you would see/elaborate on that side of traits?
> Hi Val,
> Sorry for taking so long to answer, this week has been hectic.
> I most definitely agree. Manipuling objects that the programmer can
> identify has real objects, and build graphical representations, is great
> as it helps him building a mental representation of his code. It is
> actually a great way to introduce object oriented programming to
> Traits is nice for describing physical objects as one can use custom
> validators to constrain the attributes of the objects to meaningful
> values (say for instance that an electrical power must be positive).
> Another nice thing is that with the "_traits_changed" hook, you can have
> objects that update their properties when some of their attributes are
> I must say I think that traitsUI is _the_ solution for physics-related
> GUI programming, unless you have to use C for performance reason. And
> even if I had to use C for performance, and a lot of time in front of me,
> I would try to use a mixed language solution.
> SciPy-user mailing list
> SciPy-user at scipy.org
More information about the SciPy-user