-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unicode alternatives: otimes
and oplus
#109
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #109 +/- ##
=======================================
Coverage 81.40% 81.40%
=======================================
Files 42 42
Lines 5565 5565
=======================================
Hits 4530 4530
Misses 1035 1035 ☔ View full report in Codecov by Sentry. |
Probably needs some coverage :-). I am also wondering whether it is not better to really just have a unicode alternative to |
I definitely also prefer having a fixed unicode alternative for this. It also creates less confusion when implementing the interface, as with the current implementation you would have to implement I do think |
Ok sounds good. However, I would keep using the actual unicode in all of the method definitions; I do like it more than the ascii |
I'll implement when I find some time. Just for completeness: I double-checked and the alias thing works how you would expect: they are completely equivalent and defining methods for either implements them for both, so we can definitely just keep using the unicode everywhere. julia> otimes(a, b) = a * b
otimes (generic function with 1 method)
julia> const ⊗ = otimes
otimes (generic function with 1 method)
julia> ⊗(a::Int, b::Int) = 2 * a * b
otimes (generic function with 2 methods)
julia> otimes(1, 2)
4
julia> ⊗(1, 2)
4
julia> 1 ⊗ 2
4
julia> ⊗(1.0, 2.0)
2.0 |
I implemented the changes, and in the meantime also added a non-unicode alternative for |
Adds a non-unicode alternative to
\otimes
for sectors:fusionproduct
.Fixes #108 .