Performance improvements for D / DMD compiler.
Bill Baxter
dnewsgroup at billbaxter.com
Sat Jan 20 06:14:28 PST 2007
Dave wrote:
> Christian Kamm wrote:
>> If inout is used, it doesn't guarantee B) and even worse: I'm lying to
>> anyone reading the function signature. A pointer will also require
>
> I agree, I don't like the thought of us having to use inout as an
> optimization. That's not what it's meant for. Leaving aside the notion
> of 'const' right now, I think 'byref' or some such would work fine for
> this purpose. It tells a function user "this is passed by reference" and
> is easily grep-able (unlike '&').
>
> And a pointer will require the use of '&' at every call site instead of
> 'byref' just once in the function definition.
So you're suggesting byref would be a synonym for inout? And the
compiler would treat it exactly like the current inout? If the
compiler's not going to be of any help in making sure that I don't
change things that I don't mean to be changing, then I don't see much
point in introducing a new keyword.
--bb
More information about the Digitalmars-d
mailing list