Date: Sat, 4 Mar 2000 06:23:44 +0600 (LKT) From: Kalum Somaratna aka Grendel X-Sender: root AT darkstar DOT grendel DOT net To: djgpp AT delorie DOT com Subject: Re: C++, what is it (Was: Re: Fastest bitblt?) In-Reply-To: <8ee0cs85nn9dj8fhdnhh1tap8teboto8kj@4ax.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 3 Mar 2000, Damian Yerrick wrote: > On Fri, 03 Mar 2000 11:22:15 -0500, "Campbell, Rolf [SKY:1U32:EXCH]" > wrote: > > >Kalum Somaratna aka Grendel wrote: > > > >> Damian Yerrick wrote > > > >> > C++ can do operator overloading, which converts > >> > farpokel() into an array access. > > > >Although you could make a 'FarArray' class which changed > >array accessing into 'farpoke*' calls. > > Sorry, I was unclear. > Anyone care to write a FarArray class based on templates (hee hee > hee)? ;-) > > >> What about the poor guys (a lot of people BTW, just see > >> how much of the source out there is C) who program in C. > > I program in C too. Yes C is still the standard. But sometimes like when I play games like the command and conquer series etc I think that since most of the units (rocket launcher, soldier etc) have basicaly similar priorities, coding in C++ using a Object oriented approach should make things easier. And for such games c++ should be the language of choice.. > > >> BTW I love C++ but sometimes I get the feeling when I read > >> statements like the above that it is more a toolkit which you > >> can use to "patch up" various problematic designs rather than > >> a programming language. > > > >What do you mean by a toolkit for patching designs? > > I think Kalum means that C++ can be used to create wrappers for > libraries whose interfaces suck. You are correct Damien, but what I really want to comment about was that c++ is used more often to add things like array bounds checking, non zero based arrays, which should have been part of the original language, rather than using c++ to extend and design better programs.. If you consider null terminated strings for example in C, I bet that this simple "feature" is the root cause for hundreds of errors in existing programs. Also frex- : see how the questionable design of some of the standard C string library functions can be "patched up" by using string classes etc... But please be assured that I love C and C++ and I that don't want to start a flame war or have the c++ faithfuls of the djgpp group storm in to my place and nail my gizzard to my PC ;-) Kalum Hi, I'm a signature virus. plz set me as your signature and help me spread :)