-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extensibility? #3
Comments
Currently we have the https://github.com/blaze/libndtypes2/blob/master/tests/runtest.c#L76 This type is matched by name only (as requested by @sklam). It carries the complete type description for informational purposes, but we can easily add an entirely opaque version, too -- or simply allow NULL as the type for opaque pointers. Internally, the Nominal type is represented like this: https://github.com/blaze/libndtypes2/blob/master/ndtypes.h#L223 As far as the higher level is concerned, there is a natural hierarchy in the types which I've attempted to highlight by indentation in the https://github.com/blaze/libndtypes2/blob/master/ndtypes.h#L115 If at some point we want to expose this hierarchy via Python objects and allow inheritance, we could probably simulate that by adding a new type constructor, say class Any: pass
class Real(Any): pass
class Float64(Real): pass
class MyFloat(Float64): pass
|
I think this one is superseded by xnd-project/libgumath#4. |
It is good to see progress on this library. One of the key aspects of this library is that it must be extensible from the beginning.
How would someone dynamically extend the available types? They need to be able to do this without recompilation.
The text was updated successfully, but these errors were encountered: