New library: open multi-methods

Jean-Louis Leroy via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jul 19 04:00:43 PDT 2017


On Wednesday, 19 July 2017 at 06:27:40 UTC, James Dean wrote:
> Interesting. One problem I think the above approach has is 
> adding methods after compilation. Say, a plugin adds a new 
> derived matrix type SparseMatrix and wants to customize the 
> addition of them. This is impossible under the current model, 
> is it not?

Why? I haven't tried it yet (putting together an example is one 
of the TODOs before v1.0.0) but I fully expect it to work. The 
dispatch tables are created at compile time. Just call 
updateMethods after loading or unloading the DLL and it should 
work. It does in the C++ version.


More information about the Digitalmars-d-announce mailing list