John M. Dlugosz wrote:
Your nomenclature makes me think you are coming from an APL background.
Actually, I've never used APL.
The main influences for the terminology I use, besides Perl which is my favorite
general purpose language, is the field of relational databases, both the SQL
language and other database languages, which are heavily tied to the domains of
logic and math etc, so I use math/logic-based terminology a lot. I've also
studied a wide variety of languages and appreciate functional ones, though I
haven't really used them at all. I also appreciate OO languages.
!=== is already generated from ===, and compares the identity of any two
objects. It works on binary values since they are value types, but
that's not the "proper" usage, and Perl separates out the concerns.
I prefer to conceptualize all values as immutable, and if you have something
that is mutable, it isn't a value but a container; the identity of every value
is itself, and all values are distinct by definition. I appreciate Perl 6's
design, with the distinct ===, eqv, =:=, ==, eq operators. I know what === is
for. I also know that given its current design, === and !=== just happen to
have the same semantics as logical xnor and xor when given 2 Bool inputs, and so
they serve the purpose. Having distinct xnor and xor operators is useful from
partly a documentation perspective and from error-checking; a strict compiler or
runtime should complain if non-Bool inputs are given to them.
Some of the things you mention do indeed make sense as a principle form
for an operator, with the current way a digraph. For example, <=. It's
been a digraph approximation for so many decades that we have
forgotten. My editor shows the ≤ when it formats <=.
I thought so, and that's why its good to take advantage of "the real thing" when
we are able to, and take the approximated spellings for what they are,
"exists" has already been changed to an adverb on the lvalue, but I
suppose a macro could still be made to work.
-- Darren Duncan