|
From: | Bill Page |
Subject: | Re: [Axiom-developer] CAS for the masses |
Date: | Fri, 30 Mar 2007 00:01:07 -0400 |
User-agent: | Webmail 4.0 |
Quoting Ralf Hemmecke <address@hidden>:
Bill Page wrote:On the other hand Python does directly support building classes at run time while domains and categories can only be defined at compile-time in Axiom.Could you elaborate on this (on the python and aldor side). Can you give a small example what you think is possible in python that cannot be done with aldor. At first glance I have my doubts that "domains can only be defined at compile time in aldor". Already Aldor's ability to write domain-constructing functions is a counter example. But you probably meant something else.
You are right that I did not state this properly. Of course we can evaluate expressions (including functions) that return domains and categories. What I was trying to say is that domains in Spad and Aldor are immutable during run-time. Once constructed their "value" is constant and can not be changed. For example we can not insert or remove anything in the list of exports or even replace one exported function with another during the execution of the program. This is possible in Python. Note: I am not talking about the post facto library extension feature in Aldor. 'extend' is a compile-time operation. In Python on the other hand new classes can be created dynamically. See for example the method '__new__' in http://docs.python.org/ref/customization.html and the module 'new' here: http://docs.python.org/lib/module-new.html Regards, Bill Page.
[Prev in Thread] | Current Thread | [Next in Thread] |