3 ms·
The expression problem is, roughly, how easy it is to extend a program without recompiling it. OO is typically regarded as making it easier to extend the data
by mjburgess 4y ago
The expression problem is, roughly, how easy it is to extend a program without recompiling it.
OO is typically regarded as making it easier to extend the data types of a program, since you can introduce new ones by inheritance at any time. Whereas pure FP systems specify types exhaustively at definition.
FP typically makes it easier to extend the functions, since you can define arbitary more functions on the "public" type system; whereas OO encapsulates stuff and makes it harder to do that.
> You can build an extension point into the ADT for user defined components
I assume that means there are ways of making the pure-FP approach OO-like, and vice versa.
I think its nevertheless to speak about affordances here, and rust is in my view, one of the poorest DX/affordancey languages --- the syntax and semantics conspire to create lots of friction.
This friction isnt really considered in "the expression problem", but i think is very important in practice.
We should have a "frictionless expression problem" and I think that's the issue with rust: it doesnt frictionalessly extend in the ways needed by UI programming.
- cloogshicer 4y agoThank you for taking the time to explain!