
How to prove resource costs using type theory, eliminating the need for “gas” - zenprotocol
https://blog.zenprotocol.com/on-resource-verification-1b3fcf1f41e2
======
al2o3cr
I don't follow how this approach accommodates functions whose computational
cost is influenced by input data. As a minimal example, what would the "cost"
annotation be for a tail-recursive "list length" calculation?

------
Piskvorrr
"Joining costs together isn’t so simple in a language that can express loops,
branching, and recursion — our language has to be quite sophisticated in order
to make it possible."

In other words, did you just handwave away the halting problem? O_o (FYI:
[https://en.wikipedia.org/wiki/Halting_problem](https://en.wikipedia.org/wiki/Halting_problem)
)

