Path: utzoo!attcan!uunet!clyde.concordia.ca!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!prls!pyramid!oliveb!amiga!cbmvax!cbmehq!cbmdeo!adspdk!hclausen From: hclausen@adspdk.CBMNET (Henrik Clausen) Newsgroups: comp.sys.amiga.tech Subject: Re: C++ Message-ID: Date: 13 Sep 90 03:38:12 GMT References: <26ed022f-8f5comp.sys.amiga.tech@tronsbox.xei.com> Lines: 92 >In article <26ed022f-8f5comp.sys.amiga.tech@tronsbox.xei.com> tron1@tronsbox.xei.com (HIM) writes: > > I fully expect to get the standard "Why would you use THAT!" flames > from anti-lattice and anti-C++ folks but here goes. OK, I'm using Lattice C, and used C++ as well, so I can comment (I hope) > I am about to begin work on a commercial programming project for > the Amiga (I will be getting a A3000 to do it on) This means compiler speed will be no problem, even with C++. > I own the Lattice C++ 1.0 compiler , and a full set of the > Lattice 5.10 complers, I have done a LOT with the 5.10 and > quite a bit with C++ (cfront 1 and 2.0) at Belle Labs... so much > so that I really don't want to give up the adavantages of C++ > for this project. > > So , the dillema is... do I : > > 1) Write it in C 5.1 , and have guarenteed OS 2.0 compatibility > source debugger and all. 2.0 compatibility is not really a problem, it's pretty easy if you follow the docs. > 2) Use the C++ Compiler and have the object work available to > make life easier. > > SO .. there are some questions I would like to ask so I can evaluate : > > 1) I have examined the output C from C++ , it makes very standard > 1.2 Style calls to the OS. The example programs that use > windows/gadgets/draw graphics all run under 2.0 without > problem. > > HOW compatible is 2.0 to 1.3 code ? I am not talking about > manipulating device drivers, or playing with the blitter here, > just standard MENU/WINDOW/GADGET work assuming the C code plays > "By the rules" ? There's a lot of new stuff in 2.0. If you use this, you break. If not, it works. So, using the 1.3 AutoDocs is a good start. But then, there's a lot of neat stuff in 2.0 that you want to use. Version checking will make both available for you - you don't do any 2.0 calls if running under 1.3. Easy to test on the A3000, BTW, having both Kickstarts available. > 2) Has anyone on the net attempted to work with the C++ compiler ? Yes. I scrapped it when I got down to real programs with more than one source module. I had to compile every module except one with -x due to their 'smart' tricks with IntuitionBase & GfxBase... In the end, I came across so much that didn't work that I converted that project back to ordinary C. > I have seen posts about that it is buggy to the point that it is un-usable, > but I havent seen any BUGS. The simple Gfx demo program produced a memory loss of 2.5K every time it was run. The example shipped with the compiler! I couldn't find the source for the loss in the example. It might be there though, been a while since I looked. > is only with the SIMPLE tests I have run. Any opinions > (as opposed to flames) welcome. I don't hope you consider the above a flame... > I guess that about does it , and now that I am looking over the list >I just put in it seems like I will have to go with C unless anyone says "Ive >done it it's fine" ... but every time I want to overload a function that voice >will say "you should have used ++" unless I at least ask! I really liked C++ from the language point of view. Having only a 68000 CPU, compile time was a problem. It was the slowness and buggyness of the implementation that made me drop it. Not being able to CodePRobe the code also made a big contribution. I use printf()'s a lot in preference of CPR, but compile time became prohibiting. SAS (formerly Lattice) seem to be working on a C++ compiler that is NOT a preprocessor coupled to the (not too fast) C compiler. This might make a big difference, but it's still a decent time into the future. I'll probably give it another chance by then, I'm quite attracted to C++. >= "And in the darkened offices, the terminals shine like stars." = Hey, where's that from? -Henrik -- | Henrik Clausen, Graffiti Data (Fido: 2:230/22.33) | | ...{pyramid|rutgers}!cbmvax!cbmehq!adspdk!hclausen | \__"Do not accept the heart that is the slave to reason" - Qawwali trad__/