14 ms·
that only works if the method knows about all the types that might exist. The reason overloading is necessary is that the person that writes + for your programm
by adgjlsfhk1 5y ago
that only works if the method knows about all the types that might exist. The reason overloading is necessary is that the person that writes + for your programming language doesn't know all the types that people will want to call + on. As such, you need a way to define new implementations of + when people add new types in the future. This forces you to have some form of overloading.