example sources in both Python and C++

Bill McClain wmcclain at salamander.com
Tue Oct 3 08:06:24 EDT 2000


In <mailman.970548846.29928.python-list at python.org>, "Daniel Berlin <dberlin at redhat.com>" wrote:

> Why would you ever want to use a local type as a template argument?

Because locality is good. I create and destroy data structures within the
scope of a function all the time. In such cases there is no reason why
the type should not be local also.

I admit I don't understand template instantiation. But in this case, why
would we need a mangled name for the linker at all? When a type is
local to a function (or even a compilation unit), wouldn't it be possible
to give it a temporary or anonymous label?

-Bill 



More information about the Python-list mailing list