Morpho-lang / morpho

The Morpho language 🦋. Morpho is a small embeddable language for scientific computing applications.
MIT License
30 stars 10 forks source link

Class multiple dispatch #271

Closed softmattertheory closed 1 month ago

softmattertheory commented 1 month ago

Improves multiple dispatch on classes. Methods are not inherited correctly, and overwrite older methods with equivalent signatures.

Multiple initializer methods can now be provided in class definitions, and they are selected correctly by the virtual machine.

joshichaitanya3 commented 1 month ago

Nice! Is there any particular behavior that needs to be stress tested / could benefit from new tests?

One thing I noticed while running the test suite locally on a Ubuntu machine that some of the tests under matrix that are supposed to throw an error (eg, concatenate_sparse) were taking quite a bit of time (a few seconds) to actually throw the error. The tests are still passing, but wonder if you see this behavior on Mac or any other machines too. I checked that this doesn't happen on the current dev branch.