|
|
|
|
|
by userbinator
3630 days ago
|
|
Another alternative is "table-oriented programming", where you define the "classes" and "methods" as an m-by-n structure of code pointers; to add either "methods" or "classes", you would just add a new row/column to the table along with the appropriate code definitions. and because "expression problem" is not a very catchy name. It's also not particularly descriptive either, but the page mentions that it's a form of "cross-cutting concern", to which the table-oriented approach basically says "do not explicitly separate the concerns." (More discussion and an article on that approach here: https://news.ycombinator.com/item?id=9406815 ) As a bit of a fun fact, doing table-oriented stuff in C is one of the few actual uses for a triple-indirection. :-) |
|