Re: About programing, a general question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/22/2010 03:07 AM, les wrote:
> On Wed, 2010-12-22 at 14:05 -0500, Jerry Feldman wrote:
>> On 12/22/2010 01:52 PM, Parshwa Murdia wrote:
>>> On Thu, Dec 23, 2010 at 12:19 AM, Jerry Feldman<gaf@xxxxxxx
>>> <mailto:gaf@xxxxxxx>>  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.
>>
> VERY well said.  Thank you Jerry!

I was on the ANSI C committee for a brief time when C was being spec'd 
out back in the late '70s and early '80s.  Our company was an early
adopter of Whitesmiths' C on Vaxen and PDP-11s.  PJ Plaugher of
Whitesmiths was the first secretary of the committee.

<rumination style="big_grin">
PJ had an interesting take on things.  I remember that Whitesmiths
version of the now-standard "atexit()" function was called "onexit()".
When reading the man page, the prototypes for the arguments were really
mucked up.  In the "Bugs" section of the manpage, he said, "...the type
definitions defy description and are still wrong."  Also, forgetting
the terminating null in the source string used with their "cpystr()"
(now "strcpy()") function was deemed "mildly perilous."
</rumination>

Technically C++ grew out of AT&T Bell Labs' Cfront, which was an OOP
pre-processor for C. The combination of C and Cfront was often referred
to as "C with classes".

When C++ was first being codified formally it was called "Incremental
C".  Since "++" is the C increment operator, the name sort of fell out
serendipitously.  First it was cute, then the lightbulb went on with
"Hey, that's a GREAT name for it!"  I remember discussions as to whether
a follow-on language would be called "D" or "P" (since the roots of C
are based on the old BCPL language).

C# is Microsoft's implementation of C++ with some extensions (mostly the
".NET" crud).  It is more-or-less compatible to ANSI C++, but not
completely.  Microsoft seems to have a horrible aversion to using
industry standards (ADS is a subset of LDAP, for example, but they'll
never say so).

Q: How many Microsoft engineers does it take to change a lightbulb?
A: None.  They redefine darkness as the standard.

Now, looking at things such as Java...does anyone else remember a rather
noble but failed experiment called "UCSD P-System Pascal", championed by
Nicklaus Wirth in the '80s?  Same idea, compile to some bizarre, byte-
code version of the source and have a target-specific interpreter to
act as a virtual machine to execute the byte-code.  So Java certainly
isn't revolutionary, or even a very new idea.

Perhaps P-Systems' failure was due to not having gobs of memory or fast
processors to implement the virtual machine at that time and that Sun
Microsystems wasn't behind it as they were with Java.

Anyway, that's my contribution to the discussion.

(donning my flak jacket and flame-retardant suit for the inevitable
missiles that will be hurled in my direction)
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, C2 Hosting          ricks@xxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-       A squeegee, by any other name, wouldn't sound as funny.      -
----------------------------------------------------------------------
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux