2 ms·
Just look at the article. They define "SubProg%" precisely to have more abstraction power. At some point someone will want to have loops, conditions, recursion,
by valenterry 5y ago
Just look at the article. They define "SubProg%" precisely to have more abstraction power. At some point someone will want to have loops, conditions, recursion, ... where does it end?
Because of that, it's much nicer to use the power of the host language directly, so you don't have re-invent all these things everytime - but with free monads you keep the property of having a well defined, business specific list of actions or instructions that can be interpreted in different ways.
- vidarh 5y agoWhat you're describing is mostly an implementation detail to me. The point of this example is not that you can't do it in a higher level language. The point is to illustrate the power of being able to create a list of code as data. Everything else is implementation detail.
- valenterry 5y agoWell, I totally agree with you! My whole point was to offer an alternative that makes this implementation easier and offers some nice extras (while sacrificing free choice of syntax). :)