-
Notifications
You must be signed in to change notification settings - Fork 21
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
Convert to parametric types. #51
Conversation
…Fractional This was prompted by testing in Winston
OK, I do believe we can merge this. This is (mildly) breaking. A few situations will likely trigger an error:
Here are the packages that depend on Color.jl, together with what I know about them:
I was intending to submit PRs or at least raise issues in most of these, but it looks like it may not be necessary. Perhaps a brief public service announcement on julia-users would make sense, though. |
This code makes me happy. I love that we're not forced to either make compromises or implement multiple versions of everything, as we would be in many other languages. |
end | ||
AlphaColorValue(c::T, alpha=1.0) = new(c, alpha) | ||
AlphaColorValue(c::C, alpha::T) = new(c, alpha) |
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.
Did you lose the default value here?
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.
I think it should be covered by the outer constructor?
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.
Right, missed that.
Agreed, Julia is very nice that way. Thanks for merging! |
OK if I tag a new version in the next 24 hrs? I'll try to coordinate a new release of Images to go with it, since that's the one clearly-broken package. |
Gadfly tests look good, so it's fine with me. |
OK. Since this is breaking, should we increment the minor version? |
Might want to look closer at PyPlot. Even though there aren't any tests, it does use |
Probably PyPlot will now need to use |
Thanks, @stevengj |
Actually, it looks like it works as-is, because your fallback |
That was the plan, glad to hear it actually worked. |
Tagged 0.3.0 |
DO NOT MERGE YET: waiting on JuliaMath/FixedPointNumbers.jl#2.This implements #42. Tedious but hopefully well worth it. I also added lots of conversion tests, and this caught at least one missing method.
I'm pretty excited about what this will allow in Images!