Unicode aliases

by Alexander Kogtenkov (modified: 2020 Jun 11)

While EiffelStudio supports general syntax for feature calls using a dot notation like foo.plus (bar), sometimes it is more convenient to use operator expressions like foo + bar. The number of operators available in ASCII is limited, but aliases can use Unicode. This possibility has finally reached classes of kernel library. Aliases added in EiffelStudio 20.05 are summarized in the table below:

Feature Alias
ASCII Unicode
bit_and &
bit_not
bit_or |
bit_shift_left |<<
bit_shift_right |>>
bit_xor
conjuncted and
conjuncted_semistrict and then ∧…
disjuncted or
disjuncted_semistrict or else ∨…
disjuncted_exclusive xor
implication implies
is_deep_equal ≡≡≡
is_greater_equal >=
is_less_equal <=
negated not ¬
product * ×
quotient / ÷
standard_is_equal
three_way_comparison

Combined with symbolic forms of loops, the following expression across cheeses as c all age (c.item) >= a and moisture (c.item) = semi_hard end can now be written in a more math-like notation: ∀ c: cheeses ¦ age (c) ≥ a ∧ moisture (c) = semi_hard