Function name conflict: ADL / function merging?

Ok, I finally understand this. It took me a while, because this C++ approach is so completely at odds with the lisp worldview. The lisp view of f(x, y) is that first f, x, and y are evaluated. In fact they can each be arbitrary expressions and don’t have to be names/symbols. Then the object resulting from evaluating f is used to do a call. That object always does the same thing no matter how you got it. E.g. f(x, y) can be rewritten to

stuff = [f]
stuff[1](x, y)

Now, it’s possible that f could be an object that implements a form of ADL over its arguments. But it’s these objects that would populate the “single global namespace” of function names — there has to be some namespace that maps the name f to an object that does what you want, and you have to be able to see that binding.

8 Likes