That should not be a problem. It is a problem in D because of a lacking in D.
>How would you suggest improving the signature of map given that D doesn't have typeclasses?
The language needs fixed so it can express its own types.
That should not be a problem. It is a problem in D because of a lacking in D.
>How would you suggest improving the signature of map given that D doesn't have typeclasses?
The language needs fixed so it can express its own types.
It is not a problem, the compiler copes with it. The problem comes from the fact that such a type is absolutely not interesting to know how it is written. The unmangled type is unreadable.
When the return type actually matters, auto should be avoided unless there's no way around it. But that's why we have "Returns:" in Ddoc. The function signature itself is not the complete documentation. I mean, you're acting like all D functions are documented to return auto. They aren't. It's used where it needs to be.
The language expresses its types just fine (it's in the mangled name in the object file). The issue is that there is no point in the human readable form of these types.