3 ms·
It might simply be the time to invent a more modern ABI. If for some reason modern languages insist on monomorphization, we should be able to design an ABI tha
by choeger 6y ago
It might simply be the time to invent a more modern ABI.
If for some reason modern languages insist on monomorphization, we should be able to design an ABI that suits that need.
Rough sketch:
A modern shared library is code that generates code (very much like a dynamic linker is actually code that links code).
The interface of the library would consist of:
a) a description language for the shape of data types (not types themselves, mind you)
b) a list of generators for functions
c) a list of function applied to shapes as a requirement
The job of the modern dynamic linker would then be to invoke all the functions to the necessary shapes, put the resulting code into memory and link it. It might be useful to support this with some kind of caching mechanism.