3 ms·
I'd rather see a language with more math-like operator symbols (e.g. for-all, element-of, union, is-proper-subset, etc) and an accompanying keyboard.
by amelius 7y ago
I'd rather see a language with more math-like operator symbols (e.g. for-all, element-of, union, is-proper-subset, etc) and an accompanying keyboard.
- stan_rogers 7y agoThat would be APL.
- uryga 7y agoi think Agda has a whole bunch of Unicode operators, and you can define your own. you can do that in Haskell as well, but it's pretty uncommon. Perl 6 has some Unicode stuff too
- jodrellblank 7y agoDyalog will sell you a keyboard to go with their APL: https://www.dyalog.com/uploads/images/Business/products/dk_rc.jpg https://www.dyalog.com/uploads/images/Business/products/dk_r... ∪ - dyadic downshoe is union ( https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%u222A%20%27a%27%20%27ab%27&run https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%u22... ) proper-subset isn't builtin; this might do it, but there are probably neater ways 'ab' 'cde' 'fg' {((≢⊆⍺)>≢⊆⍵)∧(≢⊆⍵)=+/⍺∊⊆⍵} 'cde' 'ab' "If the count of items of the left vector is greater than the count of the right vector (right side is smaller, it is proper), and the count of the right vector is equal to the number of elements in the right vector which are in the left vector (i.e. all of them are found, it is a subset)". https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%7B%28%28%u2262%u2286%u237A%29%3E%u2262%u2286%u2375%29%u2227%28%u2262%u2286%u2375%29%3D+/%u237A%u220A%u2286%u2375%7D%20%27cde%27%20%27ab%27&run https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%7B%... Not sure it needs "for-all" because functions work on all elements by default. It can have for: loops, but they aren't math-like.