Subj : Re: OO compilers and efficiency To : comp.programming From : Flavius Vespasianus Date : Thu Jul 21 2005 04:54 pm "Rob Thorpe" wrote in news:1121936779.815773.120160@g47g2000cwa.googlegroups.com: > Flavius Vespasianus wrote: >> I do a lot of code conversion from C++ to Object Pascal and every >> time I find many programming errors in my C++ code because of >> Pascal's much better error checking. >> >> For my main project, it takes several minutes to compile the C++ >> version. > > That's an odd thing to do. You convert code from a standard language > with many compiler vendors, to a non-standard language with only one > compiler vendor and a smaller base of skilled programmers. Still, if > you want. Actually there are free compilers for Object Pascal. I am considering making it my primary development language as I have become tired to C++'s problems and C# and Java providing no net improvement. > >> The equivalent Object Pascal code compiles in less than a second. > > There are many reasons for this, the biggest three are: > 1. The object pascal compiler is very fast because it doesn't optimize > much The pascal compilers optimize just as much. > 2. Many C++ programmers write very sub-optimal makefiles > 3. C++ has syntax that is difficult to parse, compared to C or Pascal > for example C compilatoin is also slow. The entire concept of using include files to share definitions is antiquated and inefficient. No matter how efficent you make your include files, the compiler has to parse through them character by character - for all the compiler knows, a header file somewhere could have done #define while somefunction () .