cultlang / craft-lisp

The core of Cult, originally an interpreter for a lisp-ish programming language.
0 stars 0 forks source link

C++ Interpreter: Multi-methods #6

Open mason-bially opened 6 years ago

mason-bially commented 6 years ago

An implementation of multi-methods for usage with the lisp evaluation function. All functions will use this class (including lambdas!).

These methods will exist in the scope as an object.

Parts of this might be promote-able to the types library eventually (or perhaps this will implement a multi-method interface?).

mason-bially commented 6 years ago

We should build a helper to insert providers into a multimethod. For example PConstructor supports constructors of a variety of types. It would be nice if we could insert them into the new feature of our system with their type information.