On Saturday 13 Aug 2011 15:03:27 Ralf Hemmecke wrote: > Using types as arguments in functions means that types are "first class".
Ralf, Do you think first class types could be defined as in this article: http://en.wikipedia.org/wiki/First-class_object That is a language supports first class types if types: * can be stored in variables and data structures * can be passed as a parameter to a function * can be returned as the result of a function * can be constructed at run-time * has intrinsic identity (independent of any given name) So perhaps, in Axiom/FiCAS terms: A first class *type* would be a *category* that could be generated, stored, passed around and extended at run-time. A first class *object* would be a *domain* that could be generated, stored, passed around, extended and constructed at run-time. So, instead of creating a file.spad and then calling )co this would instead be done directly by code running in other domains. Perhaps I'm thinking of something like Python 'Metaclass' or OCAML 'First class modules'? It seems like the sort of thing that that would be easier to do in an interpreter than a compiler? It seems to me that, for a CAS that can do discrete mathematics at the highest levels of abstraction this would be needed. That is we need to define structures, that can define further structures, that can define further structures... Martin -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
