kenyee@ksr.com (Ken Yee) (01/09/91)
Thanks to all who replied... Ken (kenyee@ksr.com) SUMMARY OF MSDOS C++ REPLIES ============================ In particular, are the turbo and zortech compilers available for UNIX? I knew they ran under DOS, but the inclusion of G++ (which almost certainly runs only under 32+ bit OS's) got me wondering. KY> Zortech has a version for OS/2 at least - Dan uunet!ucunix.san.uc.EDU!strombrg (Dan Stromberg) ------------------------------------------------------------------------ In article <1643@ksr.com> you write: >with Zortech C++ or Turbo C++ (the two major players)? Is Gnu C++ >usable on the PC? No, Gnu C++ isn't. >Zortech > Drawbacks: - No iostream (version 2.0 streams) support >Turbo > Benefits: - Debugger with mouse interface - libraries for graphics - Doesn't require buying updates every 4 months > - Link to Turbo Pascal? > Drawbacks: > - lack of Windows support? Anyone know when there will be? > - X-windows development not possible? I don't believe Borland really plans windows support at all (tho I may be wrong). The zortech support for Unix obviously only exists if/when you actually get your hands on the Unix version of the compiler. I use the HCR C++ compiler under Unix, and find my code is more portable to Turbo C++ than Zortech (mostly because of iostream support on TC++). KY> Borland has demo'd beta Windows support to people... For what it's worth, I originally bought Zortech, and then upgraded Zortech to 2.0. When 2.1 came out, I was sick and tired of paying their upgrade fees, especially for no iostream support, and bought TC++ instead. Bill -- William G. Bunton | An engineer is a man who can do for five bob wgb@balkan.tnt.com | what any bloody fool can do for a quid. Tools & Techniques, Austin, TX | -- origin unknown ------------------------------------------------------------------------ >Zortech > Benefits: > - DOS Extender/Virtual Code Manager Turbo C++ also has a memory manager (VROOMM) which allows for virtual code and data within the standard 640K limit. > - Debugger with mouse interface Turbo C++ too -- the stand-alone debugger is superb. > - library source code Turbo C++ too, if you want to buy it. > - libraries for graphics/TSRs Turbo C++ too. >Turbo > Drawbacks: > - lack of Windows support? Anyone know when there will be? I have seen in the press that a Windows version is to be released soon. You could buy now and upgrade later. >Gnu So far as I know, this is not portable to a PC running DOS. You should be able to port it to a 386/486 running Unix or Xenix. -- Steve Clamage, TauMetric Corp, steve@taumet.com ------------------------------------------------------------------------ At work we use the g++ compiler on sun work stations. On the PC side we use the turbo compiler. I my self have not used it but I understand it works well. You mention as a draw back for the turbo compiler is that X window development is not possible. I do not think this has any thing to do with the compiler. All you need to do X window development are the X librarys and an X window server and there in the problem lies. As far as I know there are no X lib servers for the PC? We are waiting for quarter deck to release desk view X. I saw a demo of this and it looked pretty good. I have been after them to be a beta site but have not had any luck. Please let me know if some one has a decent X server an libaray for DOS. I know that It is comon to do X development in c++ on a 386/486 machine running some version of UNIX andy Andy Davidson Woodside CA. aed@netcom ----------------------------------------------------------------- kenyee@ksr.com (Ken Yee) writes: > Turbo > Benefits: It can link OBJ files from about anything. I'm not sure what you mean by the link to Turbo Pascal. TC++ is a solid program. I'm very pleased with it... > Drawbacks: > - lack of Windows support? Anyone know when there will be? > - X-windows development not possible? I believe Windows support is in development... Don't know about X.. ---- Greg Montgomery | Montgomery Consultants, Inc. | Atlanta, Georgia, U.S.A Internet: greg@turbo.atl.ga.us | Home of the '96 UUCP: {rutgers,ogcise,gatech}!emory!turbo!greg | Olympics! ------------------------------------------------------------------------ > Zortech > Benefits: > - faster? - Definitely faster. - Also has excellent code optimization, and when optimizing is enabled it runs about as fast as Microsoft C *without* optimizer. - Finally, it is one of the most mature C++ compilers in the DOS world. > Drawbacks: - Lacking C++ 2.0 iostreams library (but it should be coming soon, now that some legal considerations have been cleared up). > Turbo > Drawbacks: > - X-windows development not possible? There is nothing inherent in the language or any particular compiler that would prevent you from doing X Window System development. You just need to get the appropriate libraries and network support. - Very weak code optimization. - More than a few bugs, still, since it is a fairly immature product. > GNU > Benefits: > - free - Be careful how you use that word ("free" :-). - Supported by a network of extremely knowledgable and competent users. - Upgraded on a fairly timely basis. - Supports some extensions to the C++ language, such as exceptions (not an extension any more, strictly speaking), and named return variables. - "Same" compiler runs on a wide variety of architectures, ensuring reasonable portability. > Drawbacks: > - lack of libraries Pshaw! GNU g++ comes with a better class library than either of the other two compilers you list here. Of course, the use of libg++ is subject to the GNU copyleft (but that may change soon). KY> I meant MSDOS related libraries for TSR's, Windows, etc. > - code generator for 386 is horrible > - compilation is slow/memory hog > - Windows support? I haven't seen much talk of g++ on DOS machines, so I don't know how usable it is in that environment. It was definitely written with UN*X in mind. You might also consider Comeau Computing's C++, which is a cfront-based compiler (the only MS-DOS one?). Regards, Glenn P. Parker glenn@bitstream.com Bitstream, Inc. uunet!huxley!glenn 215 First Street BIX: parker Cambridge, MA 02142-1270 ------------------------------------------------------------------------ Gnu Benefits: - free Drawbacks: - lack of libraries ^^^^^^^^^^^^^^^^^ Don't know what you were wanting here, but `libg++' is probably the largest and most general C++ class library in existance. Anywhere. It's almost definately the most widely used C++ class library. But you do have to watch its licencing agreement. Most comercial organizations can't use it due to problems their lawyers see. Sad but true. Marshall Cline PS: If your company is interested in on-site C++/OOD training, drop me a line! -- Marshall Cline / Asst.Prof / ECE Dept / Clarkson Univ / Potsdam, NY 13676 cline@sun.soe.clarkson.edu / Bitnet:BH0W@CLUTX / uunet!clutx.clarkson.edu!bh0w Voice: 315-268-3868 / Secretary: 315-268-6511 / FAX: 315-268-7600 ------------------------------------------------------------------------ >> - Also has excellent code optimization, and when optimizing is enabled it >> runs about as fast as Microsoft C *without* optimizer. > Did you really mean the *without* part?? As in, Microsoft C with optimization > is *much* faster? I guess my phrasing was a little confusing. I was trying to say that the time of compilation (not execution) was very fast for Zortech. Zortech's C++ compiler slows down when you enable optimization, but even then it's only as slow as Microsoft's (plain) C compiler *without* optimization. Microsoft's C compiler slows down even more when it optimizes. C++ compilers are significantly more complicated than C compilers, so this is no mean feat for Zortech (or a real black eye for Microsoft :-). > I had heard that C++ for massive applications was faster than the > equivalent C application (although I doubt this could be possible and > don't remember the source of that information)... There have been religious wars fought over the misquoting, or misunderstanding, of studies comparing the efficiency of C vs. C++ code, but I try to stay out of them. IMHO, there are probably no true examples of code with identical functionality that could not (theoretically) be coded just as efficiently in either language. However, practical considerations do intrude, and there was a paper presented on a Scheme compiler written in both C and C++ where the C++ version was smaller and faster. One significant difference in the coding styles was the use of virtual functions in C++ vs. large "switch" statements in C. Virtual function dispatch is very fast compared to a "switch" statement, but virtual functions could have been emulated in C. I think the resulting C code would have been comparable in size and speed to the C++ program, but it would have been murder to read and maintain. > I meant libraries for MS-DOS related crap...the cruddy MS Windows (you can > tell I'm used to workstations) and stupid TSR concept...I'm intending to > use the C++ compiler for learning OOP by applying the concepts to some sort > of user application... I'm definitely a workstation-person, too. Have you considered getting a workstation C++ compiler (or do you have a workstation these days :-)? Life is hard enough without having to work on MS-DOS. I hope you will forgive the presumption, but if this is your first introduction to OOP, allow me to recommend two books: Object-Oriented Software Construction by Bertrand Meyer The first five chapters of this book are the most elegant and complete presentation of the core issues of OOP that I have read anywhere. It uses Eiffel as its main presentation language, but it didn't bother me (Eiffel syntax is definitely easier to scan than C++). Object-Oriented Design with Applications by Grady Booch An excellent discussion of practical design criteria for OOP using five different languages. Details of "real" projects occupy over half of the book (one for each language). A little reading at the start will save you a lot of grief. Cheers, Glenn P. Parker glenn@bitstream.com Bitstream, Inc. uunet!huxley!glenn 215 First Street BIX: parker Cambridge, MA 02142-1270 ------------------------------------------------------------------------ p.s., If I mis-paraphrase this stuff, feel free to correct me...I thought I'd try to conserve net bandwidth... Ken Yee I'm currently using Turbo C++, and for the most part am happy with it. The points I would add to your pro/con list are: + TC++ offers compilation of ANSI, 'UNIX', and K&R C as well as C++. This may be a common feature -- I don't know. - The 'new' operator in TC++ will not allocate blocks larger than 64k -- farmalloc() is required instead. Hope this helps. (mailer disfunctional, replies to: quimby@mts.rpi.edu, quimby@rpitsmts.bitnet) In article <1990Dec15.141850.3405@murdoch.acc.Virginia.EDU> Ran Atkinson <randall@Virginia.EDU> writes: /In article <28832@usc> ajayshah@alhena.usc.edu (Ajay Shah) writes: /%Microsoft C is said to have the best optimisation on the block. /In fact, empirical testing has shown that essentially all of the C /compilers from major vendors (MS, Borland, Zortech, Watcom, etc.) have /about the same level of optimisation. A recent article (this summer) /in _Computer_Language_ gives actual code examples and demonstrates /that with trivial changes to the source code any of the tested /compilers can come out on top. This is not at all true for C++ compilers, though. There are major differences in code size and code speed between C++ compilers. According to the Ladd Report, ZTC++ TC++ Run Times 107.3 187.3 EXE Size 26,480 31,476 This is for the ECOSYS benchmark, compiled and optimized for time in the large memory model. To quote from the report: "ECOSYS is an ecosystem simulation Scott Ladd wrote for his series of C++ Techniques and Applications books. The program consists of 2500 lines of C++. The program performs several million virtual function calls and creates thousands of polymorphic objects." "In both small and large models, Zortech's compiler is always faster than Borland's at producing 'debugging' programs. Since all compiles except the final few are usually of the debugging type, this gives Zortech an important advantage over Borland. While Zortech does perform slower on optimized compiles, it is uncommon to do more than a few compiles with the optimization switches on." "On the ECOSYS benchmark, Zortech produced a program that is 45% faster than Borland. Zortech produced programs that were 9% and 12% faster on the respective DHRY2 and MATTEST benchmarks. Only on the MANDEL benchmark, which is floating-point intensive, did Borland win with a margin of 8%. Clearly, Zortech's global optimizer provides a significant boost in program speed. Zortech always produced a smaller .EXE file than did Borland." Excerps from "MS-DOS C++ Compilers: A Comparison" (11-9-90) Copyright 1990 by The Ladd Group. All Rights Reserved. (303) 641-4129 /The net result is that "optimisation" isn't much of a reason to buy a /compiler. For many people this is true. But for a lot of people who are writing competitive application software, this can make a big difference. It can be the difference between a large or small memory model, between fitting in 640k or having to go to protected mode, between an application being fast enough as is or having to profile and recode bottlenecks in assembler. At Zortech, we wish to cater to the demanding professional, and have concentrated our efforts on superior compilation speed and code generation. We welcome posting of other benchmarks comparing our compilers. /The main problem with Borland as compared with say MS or Watcom or /Metaware is that they don't really support ROM-able code or /protected-mode 386 code. ZTC++ now offers a 386 compiler for use with the Pharlap DOS Extender. Watcom C and MetaWare C support 386 code and Pharlap too. Disclaimer: I work for Zortech. bright@nazgul.UUCP (Walter Bright)