C++ Logo

std-proposals

Advanced search

Re: Reserve good keywords for floating point types

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Mon, 14 Oct 2019 17:44:30 -0400
On Sun, Oct 13, 2019 at 2:35 PM Lyberta via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> This paper proposes new keywords in the form iec60559_binaryN that can
> be used by new types proposed in P1468.
>

The paper's title is "Reserve good keywords for floating-point types." But
`iec60559_binary16` (which I had to reopen the PDF twice to double-check
the spelling of) is *100% absolutely not* a "good" keyword by *any*
metric. So, the paper is currently mis-titled.

I don't see any advantage to "reserving" these tokens for "future" use. Are
you worried that if you don't reserve them now, somebody might use them as
identifiers in real code? If that's your concern, then you should be
equally concerned that someone might *already* have used them as
identifiers in real code; in which case, you are proposing a breaking
change, and you should say so.

Rather than use `iec60559_binary16` for the new keyword, I suggest you
focus on using a keyword such as `__iec60559_binary16`, and then in
whatever future proposal gives it semantics, you can also propose

    namespace std {
        using float16 = __iec60559_binary16;
    }

You don't need to "reserve" the keyword `__ie60559_binary16`, because it
already lives in implementation namespace: users cannot use it as an
identifier today. So, problem solved, right?

–Arthur

Received on 2019-10-14 16:47:44