Re: stings.hpp

Kevin Atkinson <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <Pine.LNX.4.44.0404170737030.31829-100000@kevin-p3.atkinson.dhs.org>
On Sat, 17 Apr 2004, James Lee wrote:

> On 16/04/04, 12:56:09, Kevin Atkinson <[email protected]> wrote regarding Re:
> [aspell-devel] stings.hpp:

> Inefficiency aside, what causes the implicit type cast to ParmString?
> If ParmString operator== didn't compare strings, and as far as
> compilers go it needn't, it would be an error to use it implicitly.
...
> > Yes it can.  The standard string class does not give me the control I
> > need.  In particular there is no guarantee that the string is stored in a
> > continuous area of memory, nor is there a way to get a mutable "char *"
> > pointer.  Amount other things.
> 
> Some would say immutable strings are a feature.
> 
> It seems a lot of effort is going into recreating what is part of
> the standard library.  As a matter of principle that makes me uneasy.

I have my reasons.  They are well thought out. I do not have time to 
justify my self to you.

> > The other don't inherit from String because they are implemented
> > differently.
> 
> That would be the rationalisation I mentioned.  Any reason why they
> need implementing in different ways?  Why can't Sting alone provide
> what is needed?

ParmString is really a proxy class for either a String or a const char *.  
See parm_string.hpp.

-- 
http://kevin.atkinson.dhs.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.