Top "Overloading" questions

The terms overloading and overloaded may refer to: - Constructor and method overloading, a type of polymorphism where different functions with the same name are invoked based on the data types of the parameters passed - Operator overloading, a form of functional or method overloading where the action being overloaded is an operator, such as + or -

Override number of parameters of pure virtual functions

I have implemented the following interface: template <typename T> class Variable { public: Variable (T v) : m_value (v) {} …

c++ interface virtual overloading
Calling base class overridden function from base class method

public class A { public void f1(String str) { System.out.println("A.f1(String)"); this.f1(1, str); } public void f1(…

java oop theory overloading
Why does the Scala compiler disallow overloaded methods with default arguments?

While there might be valid cases where such method overloadings could become ambiguous, why does the compiler disallow code which …

scala methods default overloading
Formatting using DecimalFormat throws exception - "Cannot format given Object as a Number"

This might look like a repeated question but I tried in all the below links and can't get a proper …

java exception overloading illegalargumentexception decimalformat
Should my PHP functions accept an array of arguments or should I explicitly request arguments?

In a PHP web application I'm working on, I see functions defined in two possible ways. Approach 1: function myfunc($arg1, $…

php overloading
How to use Reflection to Invoke an Overloaded Method in .NET

Is there a way to Invoke an overloaded method using reflection in .NET (2.0). I have an application that dynamically instantiates …

.net reflection .net-2.0 invoke overloading
Why "avoid method overloading"?

Why does Jorge Ortiz advise to avoid method overloading?

scala overloading
Why method overloading is not allowed in WCF?

Assume that this is a ServiceContract [ServiceContract] public interface MyService { [OperationContract] int Sum(int x, int y); [OperationContract] int Sum(…

c# .net wcf overloading
Why does defining __getitem__ on a class make it iterable in python?

Why does defining __getitem__ on a class make it iterable? For instance if I write: class b: def __getitem__(self, …

python iterator overloading
C++ Overload Static Function with Non-Static Function

I would like to print two different things depending on whether a function is called statically with Foo::print() or …

c++ static overloading non-static