-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
rename: MathConst => Irrational #11922
Conversation
+1 |
I like. #11200 says hello though. |
Right, what we really need is a way to deprecate exported bindings. Bonus: don't autocomplete those or otherwise expose them as suggestions. |
|
||
## specific mathematical constants | ||
|
||
@math_const π 3.14159265358979323846 pi |
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.
Should @math_const
change its name too?
4b4efaa
to
3ebabb4
Compare
Thanks for the feedback, @waldyrious! |
Glad I can help :) |
+1 |
=={s}(::Irrational{s}, ::Irrational{s}) = true | ||
==(::Irrational, ::Irrational) = false | ||
|
||
# Irationals are not rational, so unequal to everything else |
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.
Typo: Irationals is missing an "r". Also, I'm not sure I fully understand this comment. The beginning is redundant and the ending is kinda vague (especially since technically irrationals are reals).
rename: MathConst => Irrational
-1 |
Now we have generated functions, we could also get rid of the numeric |
Also, I like the change: it helps make clear why |
I like this change, but 5 hours seems like a too short comment period, especially with a global audience. |
Originally commented here: JuliaLang#11922 (comment)
Yeah, sorry about that. Got a bit trigger happy. |
I'm not convinced. It might look nicer to the eye but then why wouldn't What I'm saying is that using the word irrational, which has a well understood mathematical meaning, for a type that wraps mathematical constants which happen to be irrational but are just a tiny subset of all irrational numbers, especially when the language already has a I know it's just a name, and the type of these mathematical constants is meant to be transient (in the sense that they almost always appear as part of expressions which convert them) but it is confusing I think. tl;dr What is |
@simleb Good point. What about |
+1 for |
👍 also for |
We had a good, obvious and short name for this. |
|
I think |
|
||
big(x::Irrational) = convert(BigFloat,x) | ||
|
||
## specific irriational mathematical constants |
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.
typo here: "irriational" -> "irrational".
Well, the name Thus from now on I fully support the name |
Originally commented here: JuliaLang#11922 (comment)
Compat for JuliaLang/julia#11922 (MathConst -> Irrational)
MathConst was renamed Irrational (JuliaLang/julia#11922)
I have to say this feels like a much better name: