same watch
<T: same> lets a task that takes types compare
its values with == (see
Generics). Since
== came to compare every type by its own rule (see
Comparing): numbers by value,
text by its bytes, pointers and slices by what they point to, and
arrays, shapes and tuples by where they are, almost every type is
same. What is left out is a maybe of its
own (a kind that carries one compares it), a value that can fail
(T ~ E), a region, and a kind that carries a value that
can fail.
- Why it may waste
-
A word that nearly every type has says little: most bodies could
compare their values without it, and a missing
sameis mostly a word to type, not a mistake caught. - Why it stays
-
It is the one thing between a task's body and a
maybeor a failing value compared by mistake, and a shape of your own may one day say it is notsame(see Future).samemeans==and never similarity; that issimilar. - What would settle it
-
If shapes never come to choose their own words,
samecould be what every type but those few has without writing it, as a type hasstrby default.