-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
No Power operator #113
Comments
To be clear, we already have a method called I wouldn't be opposed to such a change. If we do this, I think the best choice for the operator is probably |
There is no So there is no easy way to implement this without casting, if you don't write it completely in pony. |
Maybe, if this is going to be implemented, Exponentiation by Squaring is a good candidate. |
I'm fine if POW is float only by necessity. A software implementation of it for integers would not be needed, but it would be nice. |
So, is there an XOR operator, then? |
@SCKelemen Yes. The syntatic sugar is "xor". Example: https://playground.ponylang.io/?gist=19f5ff394234d6e19ec5bcd1b66ea9d0 |
I suggest change the current ephemeral type indicator (^) to another like # or whatever motivation: use of ^ to exponentiation languages and others that use ^ as exponentiation: Haskell, Julia, Matlab, R, Lua, Google, calculators |
The Power operator is used to raise a number by a power of x.
Pony, however, lacks this rather important operator.
The text was updated successfully, but these errors were encountered: