Re:Set in Your Ways: Perl 6’s Setty and Baggy Types
by jlarocco on Thursday December 08, 2016 @01:58AM
(#13128865)
That at least explains where it comes from, but I'd still argue it won't be obvious to people at first.
And it's still kind of confusing. If the goal is to match math notation then wouldn't (^) or (+) make more sense?
A ∩ B = { x ∈ A ∧ x ∈ B }
Re:Set in Your Ways: Perl 6’s Setty and Baggy Types
by cygx on Thursday December 08, 2016 @04:02AM
(#13129231)
If the goal is to match math notation then wouldn't (^) or (+) make more sense?
Not necessarily. & is the ASCII symbol associated with logical 'and' that most programming languages have settled on, including Perl6, so for internal consistency, it makes sense to use it. Also note that the ampersand, while pretty rare, is sometimes used for that purpose in mahematical notation (https://en.wikipedia.org/wiki/List_of_logic_symbols).
I find that pretty obvious, actually. After all