C++ Logo

sg10

Advanced search

Re: [SG10] Updates to SD-6

From: Nelson, Clark <clark.nelson_at_[hidden]>
Date: Mon, 12 Jan 2015 18:02:20 +0000
> That does not sound entirely sane to me: I think you're suggesting
> that a programmer would duplicate some set of numeric literals, just
> so they could put digit separators in one copy of them. The risk of
> the two copies becoming out-of-sync seems like sufficient
> justification for any reasonable programmer to avoid that. Also,
> consider that #if-guarded code still needs to successfully tokenize,
> and literals with odd numbers of digit separators do not tokenize in
> C++11 and before.

I just want to remind everyone that the tokenization argument was made
before, but it was defused when it was pointed out that conditional
compilation directives could surround an #include directive for a file
containing literals with apostrophes.

On the other hand, the duplication argument is a really good one, and
is better still if the constants of different forms wind up having to
be in different source files.

Clark

Received on 2015-01-12 19:05:36