I have seen eval being misused this way a few times. Primarily, to avoid writing recursive logic, e.g. when resolving a query path.

If you have a query path (e.g. “foo.baz.baz[1]”) one can avoid writing recursive resolution (or loop) by using eval.

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.