+ 4

Exponentiation in python

pow is a reserved word in python. ** does the same thing. this creates redundancy and is bad design. pow creates error @ compile time. (without arguments). this is BAD.Agree Or Not ?

10th Dec 2019, 8:52 AM
Sanjay Kamath
Sanjay Kamath - avatar
5 odpowiedzi
+ 3
Well, according to the principle 'There should be only one way to do stuff', Python would have to call it 'bad design' themselves. ;-) But it's really not realistic to assume that there is no overlap at all in a living language - not if you want it to improve over time. You should look into C++ - you'll be very happy with Python after that, regarding overlap. No agreement with your statement to pow, though. Every function has its specification (how you call it, what you give and what you get back), and if you fail to use it correctly, you'll get an error. It would actually be worse if you got no error, but instead something crazy happened. (Again, look into C to make that experience.)
10th Dec 2019, 9:41 AM
HonFu
HonFu - avatar
+ 4
Sanjay Kamath why you have made two alternate account for asking same query. Handling multiple accounts at same time is not allowed so sent an request for deletion of one account by mail to sololearn at info@sololearn.com and no coordinate with the second account for doing any stuffs as you can do that with only one account https://www.sololearn.com/Discuss/2095188/?ref=app
10th Dec 2019, 10:39 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 2
HonFu Why not standardize the functions across languages like this (3**4)%2
14th Dec 2019, 9:29 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
Sanjay Kamath, just as standardization hasn't ever happened with natural languages, it won't happen with programming languages. They are living beings, sort of.
14th Dec 2019, 9:54 AM
HonFu
HonFu - avatar
+ 2
Hmm Esperanto 😃
15th Dec 2019, 3:28 AM
Sanjay Kamath
Sanjay Kamath - avatar