Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is polymorphism?
Message
From
28/03/1999 22:17:17
 
 
To
28/03/1999 17:32:01
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00200864
Message ID:
00202880
Views:
24
>A template is a little more. You can write a list class in a generic way and instanciate lists of any other types. So, the compiler can check a lot more things and you don't have to use casts or runtime type checks.

Yes, templates are a lot more, and very powerful. The problem with C++ is the the complexity (which is justified when a very high degree of fine control and OOP are required, C gives even finer degree of control).

Look at all the member function types of C++, standard functions, inline functions, and virtual functions. You have preprocessor directives, templates, IDL for CORBA, and MIDL for COM/DCOM. You also have operator overloading which is great if the the choice of operators makes sense. C++ has better lowlevel I/O -- Java stream I/O is excellent, but fixed length block I/O is a chore.

With Java all member functions are virtual and inline (like VFP). You will have CORBA with no IDL. And you have no preprocessor. You have fewer options, but the simpicity of the code makes up for it. You also have no pointers. Multithreading built into the language instead of API calls that change from operating system to operating system.

I like C++, it is just seems like 3 languages all mixed together at times. It is not my code that I have trouble with, it is other's code that I inherit that causes me grief.

I like a hybrid approach that uses Java for the GUI and uses C++ for the critical sections that require the performance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform