How to handle general function overloading and polymorphism in Ch?
Ch supports function overloading or polymorphism. The syntax of function overloading in Ch is different from that in C++. But, sementically, they are more or less the same. Ch let users overload a function by themselves. In C, a function must have at least one named parameter if you have variable-length argument list. Ch supports this feature. Moreover, Ch supports variable length argument without specifying the first named argument in the form of “type funcname(…)”. Thus the number and types of arguments are flexible and can be overloading with the same function name, except that the function return value type has to be fixed and cannot be overloaded. However, you can put the returned value of different types into a function argument if it is a concern. The number of arguments, data type of each argument, array information for array argument, etc. are available to users for function overloading.