auto in library functions
Jacob Carlborg
doob at me.com
Mon Dec 24 09:38:03 PST 2012
On 2012-12-24 16:09, Jonathan M Davis wrote:
> That would be horrible. Do you remember what std.algorithm looked like before
> we were able to put auto in the documentation? It scared most everyone who
> looked at it. We don't _want_ the actual return type in the docs. auto return
> types makes std.algorithm digestible.
Right. This is what I still don't like about ranges, there is no
type/interface to name them. It would be so nice if a struct could
implement an interface or similar.
> And with some functions, they literally
> return completely different types depending on their arguments, making it
> impossible for the compiler to pick anything for the return type.
Hmm, right, that can be a problem.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list