[Issue 19097] Extend Return Scope Semantics

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 22 00:06:28 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19097

--- Comment #9 from Mike Franklin <slavo5150 at yahoo.com> ---
(In reply to Steven Schveighoffer from comment #8)

> Just because Phobos follows the convention of putting the "return" parameter
> as the first parameter, does that mean the language should require it?

I don't think that's necessarily true.  Take a look at
https://dlang.org/phobos/std_algorithm_mutation.html#copy

`TargetRange copy(SourceRange, TargetRange)(SourceRange source, TargetRange
target)`

Is copy an exception?

I recently asked about this convention at
https://github.com/dlang/druntime/pull/2264#pullrequestreview-143076892

--


More information about the Digitalmars-d-bugs mailing list