Change division symbol #458
aijony
started this conversation in
Ideas and Proposals
Replies: 2 comments
-
I'm on board with this idea. It'll be a bit confusing but we can try it. Maybe |
Beta Was this translation helpful? Give feedback.
0 replies
-
FWIW to those reading along, this was ultimately implemented in the standard library! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I find that a majority of the time when I use
/
I don't need a polymorphic output. For example, this code is needs an extra type deceleration:(coalton (the Fraction (/ (/ 1 2) (the Fraction 3))))
One can imagine how nested division quickly becomes cumbersome. I propose we change the function for
Dividable
todivide
and make a(define / divide)
of type(Dividable :a :a) => :a -> :a -> :a
. Now the same code would be:(coalton (the Fraction (/ (divide 1 2) 3))))
or while casting 1 & 2 as fractions,(coalton (the Fraction (/ (/ 1 2) 3)))
Unless anyone has objections, I can make a pull request.
Beta Was this translation helpful? Give feedback.
All reactions