const?? When and why? This is ugly!

Walter Bright newshound1 at digitalmars.com
Fri Mar 6 22:58:11 PST 2009


Derek Parnell wrote:
> I would argue that the parameter signature for my_find() needs to use the
> "const(char)[]" type because that means that the coder and compiler says
> that this function won't change the input but we don't particularly care if
> the input is immutable, or mutable by something else.

If you want it to be callable by all three variations on character 
arrays, then yes.



More information about the Digitalmars-d mailing list