4 ms·
From the wikipedia: > The expression problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the da
by marcosdumay 6y ago
From the wikipedia:
> The expression problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type safety (e.g., no casts).
Why should I care about recompiling? That's an implementation detail.
Taking the compilation stuff out, it looks very similar to classy lenses.
- lastofus 6y ago> Why should I care about recompiling? That's an implementation detail. Sometimes you don't have access to 3rd party src code you call into, hence why you can't always modify and recompile it.
- adamnemecek 6y agoIts more about the modification rather than recompilation.
- marcosdumay 6y agoBut type classes solve the modification problem. (Even tough no language that I know of solves the recompilation.)
- scns 6y agoDoes that mean Kotlin's Extension Functions solve it?
- leephillips 6y agoI don’t know. Don’t ask me, ask Wikipedia.
- wtetzner 6y agoI think it's more about not being able to recompile third-party library code than your own code.