Understood.
I was thinking if there were enough valid use-cases, we could create a syntax that means "I explicitly want the compiler to infer and fill in this type at compile time". For example:
let x:??? = a.returnsAnInt()
//same as let x = a.returnsAnInt()
func foo() -> ??? { //Compiler would infer String here
return "foo"
}
Then the syntax would normally compose from the two concepts:
func bar() -> ??? as Comparable {...}
It would also work like Scala's "I'll think of a type/name later" placeholder because it wouldn't error until compile time when the type can't be inferred...
But if it isn't useful much beyond this single use case, then it doesn't make sense...
Edit: Ok, because of the Scala thing, I talked myself into checking whether this is something people want in a separate thread.