Even though this may be considered an old topic, I feel I have a few pennies worth of ideas.
If it is such a simple job don't use a pointer in the first place. Also, problems with pointers is is a problem of the coder not understanding. Pointers are crucial to so many things. If you aren't going to use multiple inheritance than don't use it. Having it allows flexibility. Think about other things in life, isn't it always better to have something even though you think you'll never use it, just in case. Once again, if you don't want to overload the function, then don't. Nothing in C++ keeps you from giving functions different names.
What is so hard about int (*function)(int c);? Also, for the third time, if you don't want to use it then don't. Once again, for the fourth time, if you don't want to use it then don't (like almost every C++ programmer), it was probably kept to keep compatibility with some C stuff.
You're complaining about a comma, a simple comma, when in Java just do a simple little program, you have to do public class Hello{ public static void main(String args[]) { System.out.println("Hello World"); }} as opposed to C++ #include <iostream>int main(){ std::cout << "Hello World\n"; return 0;} or Perl, one of the most powerful languages #!/usr/bin/perlprint "Hello World\n";
Also, Hiko Haieto, I'm sorry but Java is nowhere close to being more powerful than anything else. Also, speed is horrible. Using the unix time utility I timed a Hello World program written in Java and time output this: real 0m0.305s I've written much more complex programs in C or C++ and they never even go above 0m0.100s and rarely above 0m0.50s I only agree with WindandWater, let us pray a operating system is never written in Java. I leave with these articles: http://forums.xisto.com/no_longer_exists/ http://www.paulgraham.com/javacover.html