-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 Request] Add an Exponentiation Operator #10257
Comments
Added Area-Language, Triaged labels. |
This comment was originally written by incr...@gmail.com The exponential operator may be good idea (I'm not against it), but arguments that have been mentioned in the request are not relevant. Which favorite math function will deserve to have its own operator and which not? |
This comment was originally written by reeves.r...@gmail.com To answer your question, pow() is the only math function that is lacking its own operator because it's the last commonly used mathematical hyperoperator without one. Dart has an operator for the first 3 hyperoperators: successor (++), addition(+), and multiplication (*), but arbitrarily lacks the 4th (an exponentiation operator) which would be last operator needed by nearly any programmer. |
This comment was originally written by mario.p...@gmail.com If exponentiation gets its own operator, shouldn't the complementing operation (taking the n-th root) get an operator, too? |
This comment was originally written by mario.plon...@gmail.com Also, duplicate: https://code.google.com/p/dart/issues/detail?id=1859 |
This issue was originally filed by reeves....@gmail.com
Add a built-in exponentiation operator to Dart.
It could look like Python's ** operator.
This will contribute to the readability of Dart and the furtherance of its goals to be 'simple' and 'familiar'.
After all, you don't have to say, "multiply(x, y)" to multiply two numbers. Why should I have to say "pow(x, y)"? This is verbose, contrary to Dart's goals, and inconsistent with related Dart syntax.
The text was updated successfully, but these errors were encountered: