Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Miles Bader <miles@gnu.org> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Re: An hexadecimal digits group separator for long 64bit addresses |
| Date | 2011-06-26 20:09 -0600 |
| Organization | unknown |
| Message-ID | <87aad5mj90.fsf@catnip.gol.com> (permalink) |
| References | <1308849997.2080.3.camel@sara> <a60defb1-0c9f-41b0-a7b2-ea90cce7af89@fj19g2000vbb.googlegroups.com> |
ThosRTanner <ttanner2@bloomberg.net> writes:
>> This would clash with user-defined literals, wouldn't it?
>>
>> int operator "" _1234 (int n) { return 17; }
>>
>> 0x12cd_1234;
>
> I'd reserve literals beginning with _ for system defined use (in much
> the same way that it's considered bad style to have anything with a
> name beginning with _, although the standard only refers to _ followed
> by upper case letter).
I disagree.
Literals starting with "_" should be available for users, as they are
much more readable, and feel more natural for longer names (more than
one or two characters). That's the reason, presumably, that many
examples one sees of user-defined literals have names starting with
"_"....
It's a separate namespace, so there's no conflict with traditional
identifiers (and "bad style" is irrelevant).
-Miles
--
"Most attacks seem to take place at night, during a rainstorm, uphill,
where four map sheets join." -- Anon. British Officer in WW I
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: An hexadecimal digits group separator for long 64bit addresses Magnus Fromreide <cscpp@magfr.users.lysator.liu.se> - 2011-06-23 19:32 -0600
Re: An hexadecimal digits group separator for long 64bit addresses ThosRTanner <ttanner2@bloomberg.net> - 2011-06-25 08:51 -0600
Re: An hexadecimal digits group separator for long 64bit addresses Miles Bader <miles@gnu.org> - 2011-06-26 20:09 -0600
Re: An hexadecimal digits group separator for long 64bit addresses Miles Bader <miles@gnu.org> - 2011-06-25 08:50 -0600
csiph-web