Boost logo

Boost :

Subject: Re: [boost] Review Request: Introduction of boost::stringnamespace and string-conversion functions
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-02-18 10:05:09

On Wednesday, February 18, 2009 12:44 AM
Vladimir Batov wrote:
> >> > void f()
> >> > {
> >> > using boost::<something>::from;
> >> > ...
> >> > std::string s(from(i));
> >> > ...
> >> > s = from(j);
> >> > // etc.
> >> > }
> >> >
> >> > "from" is not as meaningful. That name almost requires
> >> retaining the
> >> > enclosing namespace or a namespace alias.
> >>
> >> ... It is clearly a bad practice. The solution is *not* to
> deploy it.
> >
> > Wow! I thought we were being reasonable until this point.
> > Apparently, I'm a horrible developer and clearly do bad things.
> > In case my sarcasm isn't obvious, I do not accept your criticism
> > of what I showed in the example. It *is not* bad practice.
> Well, I obviously was not very successful arguing my point,
> was I? :-)
> Somehow cramming a view into a sentence or two brings the
> results exactly
> opposite to anticipated. My humble apologies (I never meant to imply
> anything "horrible") and please let me try again.

I accept your apology.

> The
> bigger the scope the less meaningful is "from", i.e. doing so
> should (IMHO)
> be avoided. And that IMHO is not limited to this particular
> "from". *That*
> is what I referred as bad practice (I am guilty of
> interpreting your example
> too liberally).

The problem is, as Scott (I think) noted, "from" is a preposition, not a verb. When combined with "string" as in string::from(i), it works well. Without that scope, it fails.

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

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, gregod at, cpdaniel at, john at