Re: New Working Group Note: Requirements for String Identity Matching and String Indexing

Bjoern Hoehrmann scripsit:

> Two things are identical if you cannot tell them apart. Two things are
> merely equivalent in some context if the differences between them are
> of no concern in that context.

This distinction is not effective in programming.  If we took your
definition of identity at face value, we'd say that after:

	char *x = "abc";
	char *y = strdup(x)

then x and y are not identical strings, because y can be mutated to differ
from x, and that is an observable distinction between them.  In which
case there is no use talking of string identity at all, for there is none.

> awkward phrases like "The string identity matching specification shall
> not treat as equivalent"; clearly a specification defining *identity*
> would treat things as *identical*, not as /equivalent/.

It's best to take "string identity" as a term of art in this Note.

-- 
Business before pleasure, if not too bloomering long before.
        --Nicholas van Rijn
                John Cowan <cowan@ccil.org>
                    http://www.ccil.org/~cowan

Received on Wednesday, 7 October 2009 04:00:50 UTC