Sender: root AT delorie DOT com Message-ID: <38B15753.A30F84A0@inti.gov.ar> Date: Mon, 21 Feb 2000 12:18:43 -0300 From: salvador Organization: INTI X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.38 i686) X-Accept-Language: es-AR, en, es MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: new vs malloc References: <38AD8622 DOT AE067F97 AT tiscalinet DOT it> <004101bf7a97$06ff2ca0$cff0fea9 AT stevenhe> <88lt6e$9pj$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <01bf7ba9$8fb5a980$c3247d81 AT default> <38aebc31 DOT 19427507 AT news DOT btx DOT dtag DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Horst Kraemer wrote: > And there is no point compiling a valid C program "as C++" although > since Charles Petzold (in his excellent book "Programming windows") > recommended compiling C programs "as C++" people ruminate that this is > GOOD... Yes there is a point: C++ syntax is more strict, so you'll catch more bugs. > Imho the only profit you gain is that you have to do the malloc-cast > which is only a syntactical "ceremony" without any practical > usefulness. Wrong, that's a rule that makes the compiler to check your code much better, as a side effect you must cast malloc. > But if you prefer C++ then stick to C++ by all means - but don't call > your programs C programs ;-) C and C++ are distinct languages with a > lot of similarities. And this "lot" is the dangerous part because it > makes you forget that there _are_ differences. Hmmm... you are missing a good option: C code that only uses C++ for the really needed things. SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org set AT ieee DOT org set-soft AT bigfoot DOT com Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013