[Python-ideas] generic code and dependent types
Neal Becker
ndbecker2 at gmail.com
Fri Aug 15 12:56:46 CEST 2014
I'm interested in the proposals for adding type annotation. Coming from some
experience with generic code in c++, one of the difficult issues has been
reasoning about dependent types in generic code.
In general, we need to be able to declare a type via an arbitrary metafunction
some_metafunction<T>::type F (...
It is also useful to be able to write something like:
typedef typeof (int() * float()) my_type;
I wonder if any of the proposals will be able to handle this sort of algebra on
types? I think it's needed to truly support generic code.
More information about the Python-ideas
mailing list