On 6/10/11, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:
> On 6/10/11 4:28 PM, Andrej Mitrovic wrote:
>> On 6/10/11, Lutger Blijdestijn<lutger.blijdest...@gmail.com>  wrote:
>>> Changing a name will now break client code.
>>
>> The flag template suffers from the same issue.
>
> Actually, not. The name used with Flag is part of its type. Even in a
> separate compilation approach, the type names must match, which is not
> the case for parameter names.
>
> Andrei
>

I've either misread what Lutger said or I haven't stated my intentions
more clearly. Most probably both.. :)

By "breaking code", I'm referring to breaking compilation of existing
code, not breaking the runtime semantics.

You're doing this now:
Flag!"KeepTerminator" keepTerminator

You can change the variable name and the client code still compiles.
But are you going to keep the name "KeepTerminator" in sync with the
new variable name? It sure seems that's how this Flag template is
used. If you do, that means client code has to change as well.

Named arguments have the same problem. That's what I was referring to.

Reply via email to