const items = ∅; // empty set
if (myItem ∈ items) { ... } // is element of
const union = items ∪ otherSet;
assert items ≌ ∅; // items are all equal const items = ∅; // empty set
if (myItem ∈ items) { ... } // is element of
const union = items ∪ otherSet;
assert items ≌ ∅; // items are all equalThat said, the assertion that all elements in a set be equal doesn’t really make sense — or rather, it’d be written as “|S| < 2” by virtue of the fact that a set is defined as containing distinct elements; consequently, in a set with more than one element, all elements are not equal. If you want to use mathematical formalisms for set operations, you’d instead have to work on sets of tuples and test for a predicate: “∀x ∈ S: p(x)”.
However most of the LINQ features using the plain method call API were already exposed in Smalltalk collections.
object.Where(cond).Select(something)
would be (object select [ :element | cond ]) collect: [ :element | element ] \in => ∈
\emptyset => ∅
This allows the user to type in using an input mode they're familiar with (standard text), but get an output that looks better (IMO).The main issue is that computers don't come with a standard default layer for math and APL characters anymore so it's a huge leap of faith for someone to start to use these characters.
This depends on the implementation. In Dyalog APL for example, the special characters (glyphs) are effected using fairly simple two-key sequences. Mnemonics are used to help learning. I found it fairly straightforward, surprisingly so.
They are rather making an egotistical (but IMHO deserved) point that their work is the 3rd revolutionary call to action in the history of relational database systems.