We're #1 on Hacker News at the moment!
Adam D. Ruppe
destructionator at gmail.com
Tue Apr 28 17:06:03 UTC 2020
On Tuesday, 28 April 2020 at 16:50:20 UTC, Laust wrote:
> The lukewarm response and the type inference argument make me
> sad.
Type inference itself isn't bad, but the auto in documentation is
something I agree isn't great.
So I recently wrote this thing:
http://dpldocs.info/experimental-docs/arsd.mvd.mvd.html
It originally said:
auto mvd(alias fn).......
and then I changed it to:
CommonReturnOfOverloads!fn mvd(alias fn).......
just because I wanted the return type to be a little bit clearer.
And you can use the helper thing externally too which is
sometimes useful.
But it could just as well have said /// Returns: common type of
overloads of the passed function
sooooo idk, just I kinda see the point and have avoided `auto`
for exactly that reason myself sometimes.
More information about the Digitalmars-d
mailing list