axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] Spad and its object model


From: Gabriel Dos Reis
Subject: [Axiom-developer] Spad and its object model
Date: Sun, 10 Jun 2007 19:12:16 -0500 (CDT)

Hi,

  I've been thinking about the following for a long time now, and I
susect it is time for me to let it go to the Axiom  community for feedback.

  Spad fundamentally uses arrays of function pointers (also known as vtables)
as implementation technology for categories, domains, packages, and 
inheritance.  Each function defined gets a slot in a vtable (the thing that
materializes a domain or a package) and call to that function may be
resolved by poking at that slot and dereferencing the result. The vtable is
an array to allow constant time indexing.  That is fast.  OK.

  However, I do believe the use of arrays has inherent problems in 
terms of maintaining coherence of function pointers assigned to slots.
Because the mapping from declarations order to integer has lost important
informations (name, types, etc) of the functions being mapped.

  I would like to suggest the idea of using hastables as opposed to
arrays to implement vtables (materialization of domains and packages).
Not only it would help tame the problem of coherence, but also move
to functionalities like "post facto extensions".

Comments?

-- Gaby




reply via email to

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