About programing, a general question

Jerry Feldman gaf at blu.org
Wed Dec 22 19:05:56 UTC 2010


On 12/22/2010 01:52 PM, Parshwa Murdia wrote:
> On Thu, Dec 23, 2010 at 12:19 AM, Jerry Feldman <gaf at blu.org
> <mailto:gaf at blu.org>> wrote:
>
>     A properly optimized simple C++ program should be able to perform
>     as well
>     as C.  
>
>     --
>     Jerry Feldman
>
>
>
> Simply say, C++ is the daughter of C which has become more advanced.
I a way. C++ is essentially an Object Oriented version of C. While there
are common members of the 2 standards committees, they are currently 2
different languages. In my Northeastern C course, one of the examples I
used was a fully C standard compliant program, but it would not compile
in a C++ compiler. Some of the students were using Microsoft Visual C++,
and did not tell the compiler it was a C program. Basically they are
close. Additionally in C++ I am going to use the new and delete
operators to allocate and deallocate memory where in C, I'll use
malloc(3) and free(3) for the same thing. But, never malloc(3) and
free(3) in C++. I also don't like to get into discussions about what is
the best language. The choice of language to use for a project is based
on many factors. If the project is learning, go to a language that is
relatively easy to learn that uses the basic structures. I rarely write
assembler language directly, but many times I would simulate what I
wanted to do in C, then generate the assembly from there, and hand
optimize.

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20101222/6cf0148a/attachment.bin 


More information about the users mailing list