4 ms·
Yes, but you're relying on the undefined concept of context. How do you define context?
by jmgimeno 4y ago
Yes, but you're relying on the undefined concept of context. How do you define context?
- mjburgess 4y ago"The idea" practically, is whatever resolves the polymorphism. So context is a compiler function from syntax->semantics. Eg., `+` is polymorphic, `1 + 1` and `"1" + "1"`... the context is whatever implicitly resolves `+` to `ADD` or to `CONCAT`. The utility of these ideas is, in practice, just they provide a syntax for different kinds of polymorphism. Eg., for monads, we're basically just telling the compiler to change its implementation of `;`