In the following example, I usually describe
u32 as a "type annotation".
let x: u32 = 5;
However, I have seen others on this forum refer to it as a "type ascription".
The compiler seems to use the term "annotation":
error[E0282]: type annotations needed --> src/main.rs:2:9 | 2 | let x = "hello".chars().collect(); | ^ consider giving `x` a type
But there is also an unimplemented RFC for type ascription, which would allow users to specify types in more places.
Why is there a difference in terminology here? To me, both the compiler error and the RFC refer to two applications of the exact same concept, yet they use different words for it.
Linguistically, "ascription" seems a bit more forceful than "annotation". An annotation usually provides some extra information, whereas an ascription insists upon a fundamental attribute. If I had to choose one, I suppose "ascription" would be a better fit, but "annotation" is far more common in everyday speech, so it's a tough choice.
Is there some subtle difference I'm not seeing? If so, does it justify using a different term?