Const, strings, and other things.

Robert Fraser fraserofthenight at gmail.com
Mon Nov 12 16:42:01 PST 2007


Janice Caron Wrote:

> I like to know that when I pass /my/ data to /your/ function, then
> your function is not going to mess with my data. const in the
> declaration of your function is what gives me that guarantee.

That's a rather paranoid approach. I never worry about that in Java, or D1, or any other language without const. That information belongs in the documentation, rather than waste the programmer's valuable time dealing with obscure const bugs and typing it all over the place.



More information about the Digitalmars-d mailing list