Re: Proposal for adding named arguments to C++

2014-06-20 Thread Jim Porter
On 06/15/2014 05:04 AM, Botond Ballo wrote: > I would love to get more people at Mozilla involved in C++ > standardization / get more organized about it. > > I also have a standing offer to assist anyone at Mozilla who would > like to write a standards proposal do so, and present the proposal > at

Re: Proposal for adding named arguments to C++

2014-06-18 Thread Ehsan Akhgari
On 2014-06-18, 2:30 PM, Milan Sreckovic wrote: Works for me. For the function override in the first place though, the names of the parameters are ignored, right? Yes. Basically, I think we should not make the names of the arguments part of the function's type, which would imply that the nam

Re: Proposal for adding named arguments to C++

2014-06-18 Thread Milan Sreckovic
Works for me. For the function override in the first place though, the names of the parameters are ignored, right? -- - Milan On Jun 18, 2014, at 13:01 , Botond Ballo wrote: >> One quick question - is this covered in the proposal? >> >> class Base { >> virtual int f( int ba, char bb ); >> };

Re: Proposal for adding named arguments to C++

2014-06-18 Thread Botond Ballo
> One quick question - is this covered in the proposal? > > class Base { > virtual int f( int ba, char bb ); > }; > > class Derived { > virtual int f( int da, char db ); // is this allowed and does it count > like a base class function override? > }; > > Derived d; > Base* b = &d; > > //

Re: Proposal for adding named arguments to C++

2014-06-18 Thread Milan Sreckovic
Very cool. One quick question - is this covered in the proposal? class Base { virtual int f( int ba, char bb ); }; class Derived { virtual int f( int da, char db ); // is this allowed and does it count like a base class function override? }; Derived d; Base* b = &d; // What is the validi

Re: Proposal for adding named arguments to C++

2014-06-16 Thread Ehsan Akhgari
On 2014-06-14, 10:58 PM, Robert O'Callahan wrote: Looks good. A classic problem we have had is with boolean parameters, which are hard to read at call sites. We currently solve that by turning them into enum or flag parameters, but named parameters would be a lighter-weight alternative. However,

Re: Proposal for adding named arguments to C++

2014-06-15 Thread Botond Ballo
> A bit off-topic, but do we at Mozilla have any kind of a (semi-) > organized group of folks involved with C++ standardization? I follow > along fairly closely (especially in SG7 - Reflection) and have a couple > of proposals I'm thinking about, but that's strictly in my spare time. > It'd be nice

Re: Proposal for adding named arguments to C++

2014-06-14 Thread Jim Porter
On 06/14/2014 01:07 PM, Botond Ballo wrote: > Ehsan and I would like to propose named arguments as a new feature for C++. A bit off-topic, but do we at Mozilla have any kind of a (semi-) organized group of folks involved with C++ standardization? I follow along fairly closely (especially in SG7 -

Re: Proposal for adding named arguments to C++

2014-06-14 Thread Robert O'Callahan
Looks good. A classic problem we have had is with boolean parameters, which are hard to read at call sites. We currently solve that by turning them into enum or flag parameters, but named parameters would be a lighter-weight alternative. However, it would be great to be able to ensure at the langu

Proposal for adding named arguments to C++

2014-06-14 Thread Botond Ballo
Hello everyone, Ehsan and I would like to propose named arguments as a new feature for C++. We have a draft proposal paper here: http://ehsan.github.io/namedargs/namedargs.html Any feedback on it would be greatly appreciated! (I will not be formally presenting this proposal at the upcoming C