Subject: Re: [boost] [RFC] string inserter/extractor "q u o t i n g"
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-06-16 10:41:01
Alexander Lamaison wrote:
> On Wed, 16 Jun 2010 10:05:11 -0400, Stewart, Robert wrote:
> > Beman Dawes wrote:
> >> Are delimit() and undelimit() suitable names for the functions?
> > I don't care much for "undelimit" but I can't think of
> > anything better as "delimit" seems exactly suited to the
> > other operation.
> I'm not convinced by delimit. The dictionary definition is to do with
> marking a boundary so it applies to the ""-case but not \ and others.
Granted, but the name isn't bad given that.
> What about escape\unescape or encode\decode. The URL
> specifications call this type of operation encoding 
> but I think escaping is a more common and less ambiguous
You've done the reverse with "escape." Escaping only applies to the use of "\" to avoid special treatment of some characters within the string and not to the quotation marks at either end. IOW, we need a name that encompasses both delimiting and escaping.
"Encode" doesn't fit well because it has to do with translating from one representation to another due to (computer) language issues. Furthermore, that term is tied irrevocably with Unicode and human language manipulations, which don't apply here.
Is the problem that we have one function doing two tasks? Separate functions for delimiting and escaping (and their reverses) would alleviate the difficulty of finding suitable names for the conflated operations. That of course means that the separate functions must be efficiently composable.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
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