auto ref is on the docket
kinke via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 23 12:34:34 PDT 2015
On Tuesday, 23 June 2015 at 19:13:28 UTC, bitwise wrote:
> And I still think Timon's statement is untrue. There is a
> reason, which is that the new auto ref syntax forces reference
> parameters for all types(even primitives), where the old
> template approach does not.
Timon suggested using another syntax/name for the new refs, as
one couldn't use them in templates [and the different `auto ref`
behavior is just prone to confuse beginners, my 2 cents]. One
reason for preferring `scope ref` over `auto ref` in templates
would be situations where code bloat is more important than
runtime performance, another reason the fact that `in ref` is
more convenient than `const auto ref`. ;)
More information about the Digitalmars-d
mailing list