4 ms·
Its a shame, because there is a lot of really cool stuff you can do when you're able to work with your code in algebraic terms. Just as one simple example: Su
by bloaf 3y ago
Its a shame, because there is a lot of really cool stuff you can do when you're able to work with your code in algebraic terms.
Just as one simple example:
Suppose you have defined some expressions that describe how to read/write data from a database, and you have used them to define a workflow-expression that retrieves a bunch of data, does some math on it, and displays the result.
In Mathematica, you can plug that whole workflow-expression into the "Simplify" function and it will potentially eliminate entire database calls if it realizes you've got stuff like "GetData[y]*(GetData[x]-GetData[x])" in your result that will always evaluate to 0.
You can even do things like define a high "complexity" of your GetData functions to make the Simplify function look for an algebraic form that will minimize calls to the database, even if it has to make the algebra look uglier.
- elbear 3y agoWow, this sounds like something with a lot of potential. It also makes me think the book Algebra-Driven Design[1]. That coupled with what you're describing sounds like a powerful combination. [1]: https://reasonablypolymorphic.com/blog/algebra-driven-design/index.html https://reasonablypolymorphic.com/blog/algebra-driven-design...