Burton Samograd wrote:
> Is the Symbol type left out for a reason, or
> is it under a different name that I haven't found yet? Would there be
> any objection to adding it?
Yes, in fact it would be fairly useful to have a Symbol type (and
subtypes FunSymbol and VarSymbol) for doing meta-programming, but that
interferes with Q's current type system which only has single
inheritance. Hence a constant symbol couldn't be a member of its own
(user-defined) type, which might have its own supertype, and the Symbol
type at the same time. So, until Q gets multiple inheritance, you'll
just have to put up with the issym function and friends.
We've actually discussed the issue of multiple inheritance here a while
ago and, looking at the code, I found that extending the construction
algorithm for the pattern matching automaton to handle multiple
supertypes is not straightforward. So I'm postponing this until I have a
bytecode compiler written in Q itself (that's one of the reasons I'm
working on Q Yacc and Lex), this will make it much easier to implement
such changes.
Cheers,
Albert
--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email: Dr....@t-..., ag...@mu...
WWW: http://www.musikinformatik.uni-mainz.de/ag
|