On 02/10/14 11:41, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dl...@gmail.com>" wrote:

That would be better, but how do you deal with "bar(foo())" ? Context
dependent instantiation is a semantic challenge when you also have
overloading, but I guess you can get somewhere if you make whole program
optimization mandatory and use a state-of-the-art constraint solver to
handle the type system. Could lead you to NP-complete type resolution?
But still doable (in most cases).

I haven't really thought how it could be implemented but I was hoping that the caller could magically decide the allocation strategy instead of the callee. It looks like Rust is doing something like that but I haven't looked at it in detail.

--
/Jacob Carlborg

Reply via email to