On Tue, Jun 11, 2013 at 2:15 PM, james anderson james.anderson@setf.de wrote:
"arbitrarily depending on context" does not make sense. it is a contradiction in terms. there must be more to the argument than that.
Consider some (defstruct foo ...). The deprecated foreign type it defines is FOO. In the context of structure definitions or WITH-FOREIGN-OBJECT, it has value semantics. In the context of mem-ref it behaves like a no-op. In the context of function calls, it behaves like a pointer. That's the "depending on context" and "confusing" part of the argument.
FOO sometimes behaves like a pointer is because there wasn't support for passing-by-value (nor plans to support it) and sometimes behaves as a no-op because aggregate type translation was likewise mostly missing at the time. That's the "arbitrary" part: the semantics of FOO were dictated by the historical evolution of CFFI rather than a principled approach to the current feature set. They appear to be random to someone unaware of that evolution.
Now contrast all that with the intuitive and consistent semantics of (:POINTER (:STRUCT FOO)) and (:STRUCT FOO).
Cheers,
-- Luís Oliveira http://r42.eu/~luis/