Subject: Re: [boost] Silly Boost.Locale default narrow string encodinginWindows
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-10-28 07:11:08
Alf P. Steinbach wrote:
> Option 3 means -- it requires, as far as I can see -- some
> abstraction that hides the narrow/wide representation so as to
> get source code level portability, which is all that matters
> for C++. It doesn't need to involve very much. Some typedefs,
> traits, references.
> For example, write a portable string literal like this:
> PS( "This is a portable string literal" )
> The main drawback is IMO the need to use something like a PS
> macro for string and character literals, or a C++11 /user
> defined literal/.
> Windows programmers are used to that, writing _T("blah") all
> the time as if Windows 95 was still extant. So, considering
> that all that current labor is being done for no reward
> whatsoever, I think it should be no problem convincing
> programmers that writing a few characters more in order to get
> portable string literals, is worth it; it just needs exposure
> to examples from some authoritative source...
The problem with that approach is that existing, non-Windows, code must be painstakingly altered to introduce such manual portability constructs. If code was already written using the Microsoft facilities for portability, it's a relatively easy transition to make (s/_T/PS/, for example).
Regardless of authoritative examples, inertia is against your idea.
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