On ref return in DMD

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 3 03:52:57 PDT 2014


On Tue, 03 Jun 2014 10:14:21 +0000
"Nordlöw" via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> The title
>
> "More ref return fixes in std.datetime now that the compiler
> allows them"
>
> of
>
> https://github.com/D-Programming-Language/phobos/pull/2227/files
>
> made me curious to what is meant by ref return. Is this a recent
> improvement in DMD?

No. We've been able to return by ref for ages. However, when std.datetime was
originally written back in 2010, there were bugs that prevented it from
working for a number of the functions in std.datetime. Unfortunately, I can't
remember what the bugs were at this point, but they've long since been fixed,
and I just finally got around to making it so that those functions in
std.datetime return by ref instead of void.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list