Boost logo

Boost :

Subject: Re: [boost] [Predef] Pre-review comments
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2012-02-22 06:54:20


Rene Rivera wrote:
> On 2/19/2012 6:37 AM, Mathias Gaunard wrote:
>
> > - BOOST_ARCHITECTURE_ is maybe a bit long. Have you
> > considered a shorter name like BOOST_ARCH_ALPHA ?
> > Same comment for BOOST_LANGUAGE_
>
> I tend to prefer the descriptive names. But, yes, I've tried
> to think of ways to shorten the macro names. And would
> certainly put on my todo list to solicit naming ideas if
> wanted.

"ARCH" and "LANG" are common abbreviations, so they wouldn't be bad alternatives. They do, however, deviate from normal Boost practice.

> > Also why not use CXX instead of CPP?
>
> I was trying to be more formal for the language. But it seems
> I should change it to match the compiler prefix definitions for
> consistency.

I think consistency within your library is more important than consistency with the source macros. This makes cross-platform code more readable and consistent.

> Note, I don't consider the names of things terribly
> important.. As I'm not a bike-shed kind of person ;-)

A person can memorize only so much. A good name is easier to recall, so naming is important, even if it can sometimes devolve into seemingly fruitless bickering. (I work hard to express and defend my naming ideas until a decision is made. Once made, I accept the decision.)

> > - Standard C library is identified by LIBC, but standard
> > C++ library is identified by LIBSTD. I find that confusing,
> > it should be orthogonal.
>
> One aspect of naming I tried to be somewhat consistent about
> was to use names close to the "source" macros. This is in the
> hope that it will be more intuitive/familiar to people's usual
> platforms. With the idea that it will increase adoption if
> people can more directly map from what they currently use to a
> minimally different macro.

That's a useful take on naming, but it leads to inconsistent names for the same things with different compilers or libraries. Consistency within your library should be paramount. After all, your goal is that your names become *the* standard for all of Boost and, indirectly, for lots of other code.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com

________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk