On Fri, 10 Jun 2011 17:34:34 -0400, 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.

No, it's not the same, which actually can be viewed as a plus for named parameters. A named parameter call reduces to a normal call with boolean args, which is binary compatible, even if you change the name of the parameter.

A Flag! requires a recompile as well as a source change. For things like fixing typos, the binary compatibility might be good. For example, if you have a typo in the name of a Flag parameter in library version 1, you can never change the name and be backwards compatible with someone who has an old version of the library they are compiling against. The Flag makes it *more* a part of the API than named parameters.

-Steve

Reply via email to