Invoke a method

@StefanKarpinski @jameson Thanks for the pointers. While I don’t doubt that first-class methods would be useful in some applications, in my particular use case I decided that they would be a very convoluted and unidiomatic solution.

What I wanted to do is basically the following: have a DataFrame-like object which is basically a Dict{Symbol,Vector}. I was looking for a way to map vectors using user provided functions, and looking up the vectors dynamically. For example, suppose the user supplies a function f(b,a). The map function would look up :a and :b in the Dict, assign them to positions 2 and 1, and call broadcast with f and the vectors in the right place. I asked about argument name extraction here. The inspiration was Mamba’s implementation of this.

I am currently of the opinion that this is unnatural in Julia, since each function can have many methods, so I could have multiple matches. I could of course apply some kind of dispatch machinery to select the “most specific” one based on the type signature, but in the end I concluded that this is confusing and error-prone, and the DataFramesMeta.@with is a much more natural solution.