3 ms·
This right here is where we start to mix up two totally different things by using the same words for them. This thread is talking about two completely differen
by Fr0styMatt 13y ago
This right here is where we start to mix up two totally different things by using the same words for them.
This thread is talking about two completely different types of Equals; we shouldn't be using the same word for them and certainly not the same function name in code:
- SomeString1.Equals(SomeString2) -> are all the bytes in array 1 equal to the bytes in array 2?
- HumanSimilarity(t1, t2) - given text s1 and text s2, give me a number that tells me how similar a person would perceive these strings to be. You could even go further:
SimilarityForReaderInLocale(locale, t1, locale1, t2, locale2) - for a human reader in locale, given text t1 written by a human in locale1 and text t2 written by a human in locale2, how similar would the reader perceive these two pieces of text?
When we talk about 'least surprise' in manipulations, what I think we really mean is that text manipulation should be defined by a locale; no actually, a superset of a locale. That superset being your typical human reader in that locale.