On Jul 27, 2005, at 20:19, Jeff Hill wrote:
My reservation about this is # 29 in Effective C++ 2nd edition - avoid
returning handles to internal data.
Sure, let's make Eff.C++ (2nd edition) our bible,
which opens it up to many interdicting interpretations ;-)
To me, hiding internal data of a string class includes:
Hide how your string class gets memory.
Hide a possible interlinked list of all strings.
Hide an internal "int reference_count".
But the "const char *" to the string is
_the_data_ of a string in its only shareable format.
I don't see #29 as
"Thou shall not write a string class that provides an actual string".
-Kay
- References:
- RE: String Interfaces Jeff Hill
- Navigate by Date:
- Prev:
Re: String Interfaces Marty Kraimer
- Next:
Re: next meeting before EPICS meeting at Archamps? Kay-Uwe Kasemir
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: String Interfaces Marty Kraimer
- Next:
Re: String Interfaces Andrew Johnson
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|