4 ms·
Thank you, I enjoyed this post. I am thinking that iteration is just traversal and traversal is just execution. Take iterators in C++ or standard library "alg
by samsquire 3y ago
Thank you, I enjoyed this post.
I am thinking that iteration is just traversal and traversal is just execution.
Take iterators in C++ or standard library "algorithms" library in C++. Or iterators in Rust or in Java.
You just want to traverse and collect values (and calls on functions in some interleaving), which is like joining tables as this article says.
I'm thinking that the definition of the traversal (such as Kafka pipeline, clojure threading syntax, Clojure data driven design, Javascript lodash pipeline) can be mapped to tuples and then the computer can optimise arbitrary chains of traversals based on the number of potential tuples are available and what traversals are equivalent paths or routes to the same traversal.
In other words, every program is a compiler pipeline or database query pipeline.
Maybe Prolog and Datalog can help here. Optimisation of arbitrary traversals and determination of identical traversals.
Or monads are just ordered traversals and OCaml compilers are just traversals of execution (function application) and relationship following, which are joins.
The relational model is everywhere.
- BoiledCabbage 3y ago> In other words, every program is a compiler pipeline or database query pipeline. > Or monads are just ordered traversals and OCaml compilers are just traversals of execution (function application) and relationship following, which are joins. > The relational model is everywhere. This is interesting - could you elaborate a bit more?
- deleted 3y ago[deleted]