Date: Fri, 3 Sep 2021 13:32:04 -0400
On 9/3/21, Jason McKesson via Std-Discussion
<std-discussion_at_[hidden]> wrote:
> On Fri, Sep 3, 2021 at 11:16 AM Rick C. Hodgin via Std-Discussion
> <std-discussion_at_[hidden]> wrote:
>> IMO though, and most importantly, it completes the set of features
>> related to default parameter assignments.
>
> The core of your feature is the notion that a function's default
> parameters are an intrinsic aspect of the function itself, much like
> its parameter list. But that's *not* how default parameters work in
> C++ as it currently exists. They're currently just syntactic sugar at
> the call site, and *nothing* more.
>
> So this would not "complete" the default parameter feature; it would
> *change* it to mean it currently does not.
>From what I gather, this would actually "codify" the feature correctly
making it a first-class citizen. It would remove its current "hacked
on" implementation, and replace it with something proper.
I'm a little surprised to learn it's not a proper feature. It's one
of the most brilliant features for enhancing and not breaking existing
code. I would've thought it was a first class citizen.
<std-discussion_at_[hidden]> wrote:
> On Fri, Sep 3, 2021 at 11:16 AM Rick C. Hodgin via Std-Discussion
> <std-discussion_at_[hidden]> wrote:
>> IMO though, and most importantly, it completes the set of features
>> related to default parameter assignments.
>
> The core of your feature is the notion that a function's default
> parameters are an intrinsic aspect of the function itself, much like
> its parameter list. But that's *not* how default parameters work in
> C++ as it currently exists. They're currently just syntactic sugar at
> the call site, and *nothing* more.
>
> So this would not "complete" the default parameter feature; it would
> *change* it to mean it currently does not.
>From what I gather, this would actually "codify" the feature correctly
making it a first-class citizen. It would remove its current "hacked
on" implementation, and replace it with something proper.
I'm a little surprised to learn it's not a proper feature. It's one
of the most brilliant features for enhancing and not breaking existing
code. I would've thought it was a first class citizen.
-- Rick C. Hodgin
Received on 2021-09-03 12:32:21