-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Feature/times mutators #7806
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
Feature/times mutators #7806
Conversation
|
|
||
| proc `*=`*[T, U: TimesMutableTypes](a: var T, b: U) = | ||
| a = a * b | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't multiply a TimesMutableTypes by another TimesMutableTypes. Thats why in my proposal, i only restricted the first generic type to types defined in times.nim. This restriction is enough to avoid the ambiguity with the mutators in system.nim. The remaining validation can be left to the operations defined in times.nim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm. Valid point. But only for *=. I think other procs should remain as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
49f52e0 to
c6761e7
Compare
|
@dom96, or anyone else, what's with this request's merge? |
Well it has merge conflicts with the current devel version of |
|
ok, will fix |
c6761e7 to
c025770
Compare
|
@Araq Done |
|
Er ok, but now it loses the nice runnableExamples (though they are currently not tested because they are in a generic, but still...). |
|
As I've mentioned multiple times, I think this should be implemented
generically instead of specifically for each new type.
…On Wed, 6 Jun 2018, 10:21 Andreas Rumpf, ***@***.***> wrote:
Er ok, but now it loses the nice runnableExamples (though they are
currently not tested because they are in a generic, but still...).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7806 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAPDe9RR4DMZMCX3TTqNtQgPLoZOaCTpks5t558wgaJpZM4T5rju>
.
|
|
@dom96 Do you have something SPECIFIC on your mind? |
c025770 to
b7a8eef
Compare
|
@Araq Added some examples |
|
What I specifically have in mind is a generic proc that works for all types that define AFAIK @Araq was saying that |
Don't let the perfect be an enemy of the good. And yet another system.nim change is not fine with me. |
|
@dom96 Let us be clear. |
|
@Araq How to restart build checks? They've failed because of the strange bug, not connected with this PR |
Okay, but this isn't the first PR of this kind. We need to sort this out properly eventually. |
No description provided.