I wrote a wiki page about
impl Trait, but I want to make sure that I use the right terminology. So I did some digging, and this is what I found out:
The first RFC allows
impl Traitonly in return position, so it calls it an abstract return type.
I don't particularly like this name, because it describes the syntax but not the purpose of the feature. Furthermore, to incorporate it in an English sentence, you have to resort to phrases like "the
impl Traitsyntax" or "the
Therefore I'm inclined to use the name "opaque type". The problem is that "opaque" is an overloaded term: Extern types are also called opaque, and even structs that don't expose implementation details are sometimes called opaque, e.g. here and here.
I'd like to have a name for this that is both descriptive and unambiguous, and is used by all the official documentation as well as the compiler. I believe that such a name doesn't exist (yet). I'd like to hear your opinions, if you agree that this is a problem, and how it could be addressed!