Live data from Hacker News

A proposal for named arguments for C++

open-std.org

1–10 of 62 posts

Re: A proposal for named arguments for C++

#4
I find the discussion about ABI compatibility to be unsatisfactory.

If I'm reading this correctly, it ends up basically boiling down to a preprocessor trick; you don't get the advantage of being able to add parameters to a function, and have name-based calls to it continue to do the right thing without a recompilation.

Re: A proposal for named arguments for C++

#8

It is of some note that the order execution/passing of arguments to a C++ function is yet to be defined. For example, Whatdoesitdo (i++, i)

Given post increment, to me whatdoesitdo(i,i) then i = i+1 seems most likely. The whatdoesitdo(++i,i) case seems a bit more ambiguous once you add named parameters with reordering. Clang actually warns you if you try to do this. C or C++.

Re: A proposal for named arguments for C++

#10
I hate this idea. It just clutters the UI too much and adds noise especially if it's a UI you're familiar with. The C/C++ language is noisy enough without all this. Modern IDEs alleviate the need to be reminded inline what the values are for. On top of the fact, just about every IDE invented in the last 10 years offers code completion making this useless IMHO.
Post reply on HN