You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent remarkably rapid implementation of custom operator precedence (thanks again, my code looks much nicer now) is just encouraging the WishList Beast™. What about allowing otherwise unused Unicode non-letter characters (maybe there is some more restrictive Unicode category that would be appropriate) as 1-character function/operator names that then don't need whitespace for application:
function ∀(arr, pred = (x) => !!x) arr.every(pred)
N := [0,2,4,6,8]
if ∀N, &%2 is 0 then console.log 'We're all even!'
if ∀flags then console.log 'All systems go.'
operator × tighter (*) (v, w) // usual cross product of vectors
operator ⋅ looser (×) (v, w) // usual dot product
volume := u⋅v×w
etc, etc. The punctuation even happens to work out very naturally in the ∀ case. This facility would make writing math-y software super natural.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The recent remarkably rapid implementation of custom operator precedence (thanks again, my code looks much nicer now) is just encouraging the WishList Beast™. What about allowing otherwise unused Unicode non-letter characters (maybe there is some more restrictive Unicode category that would be appropriate) as 1-character function/operator names that then don't need whitespace for application:
etc, etc. The punctuation even happens to work out very naturally in the ∀ case. This facility would make writing math-y software super natural.
Beta Was this translation helpful? Give feedback.
All reactions