why there is no power operator in java / c ++?
- by RanZilber
While there is such operator - ** in Python , i was wondering why java and c++ havent got one too.
It is easy to make one for classes you define in C++ with operator overloading ( and i believe such thing is possible also in java) , but when talking about primitive types such as int, double and so on , you'll have to use library function like Math.power (and usaully have to cast both to double).
So - why not define such operator for primitive types ?