[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] domains with parameters versus Python classes

From: Bill Page
Subject: Re: [Axiom-developer] domains with parameters versus Python classes
Date: Fri, 30 Mar 2007 00:49:02 -0400
User-agent: Webmail 4.0

Quoting Bill Page:

I have moved your example of a domain with parameters to a
new page and added some explanatory text plus an new
example in Python that does the same thing apparently
without the complication of defining categories. See:

For Python developers this might be interpreted as an
argument in favor of Python and against Aldor/Spad. So
I think we need to find another more convincing example. :-)

We have been talking about Spad and Aldor versus Python
so I thought it might be interesting to see what Python
developers think about static typing. Here is a fairly recent
(December 23, 2004) and interesting post by Guido van
Rossum, the inventor of Python:

Adding Optional Static Typing to Python

In part Guido writes:

What is Optional Static Typing?

The Python compiler doesn't know about the types of the objects you pass around
in a Python program; only the run-time (the Virtual Machine) does. This makes
Python expressive and flexible, but sometimes means that bugs of a rather
trivial kind (like typos in method names) are found later than the developer
would have liked. Without losing the benefits of Python's dynamic typing, it
would be nice if you had the option to add type declarations for your method
arguments, variables and so on, and then the compiler would give you a warning
if you did something that wasn't possible given what the compiler knows about
those types. While there are third-party program checkers that find a lot of
problems without type declarations, e.g. pychecker ( ), it would be nice if (a) this capability was
built into the Python compiler and (b) you could give it hints in cases where
its type inference broke down.


There are also a lot of interesting comments from other people
about this article:

To me this article reads something like:"Python re-discovers
Spad 20 years later.". Of course there is more to it than that
but I still think a comparison between Axiom's Spad and Aldor
versus Python is a useful exercise.

Bill Page.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]