Invariant Strings

The language you're used to programming in very definitely shapes the way you think about solving programming problems. For example, I've been programming in C and C successors for 25 years. A deep rut in my brain is the idea that a string is pointer to an array of characters. In other words, it's a reference type. I always think of it as having two parts, the reference and the referred to data, which can be manipulated separately. The referred to data must also be memory managed, which is always at the back of my mind when manipulating strings.



March 11, 2008
URL:http://www.drdobbs.com/architecture-and-design/invariant-strings/228700475

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.