On Thu, May 29, 2008 at 10:59 PM, Trent <[EMAIL PROTECTED]> wrote:

> "C is a general-purpose, block structured, procedural, imperative computer
> programming language developed in 1972 by Dennis Ritchie at the Bell
> Telephone Laboratories for use with the Unix operating system. It has since
> spread to many other platforms. Although C was designed as a system
> implementation language, it is also widely used for applications. C has also
> greatly influenced many other popular languages, especially C++, which was
> originally designed as an extension to C."

Yes, originally... Bjarne almost based his new language on Simula but
decided to use the basic syntax of C and took things beyond being just
an extension of C. There is a common subset in syntax between C and
C++, but, in Bjarne's own words:

"The common subset of C and C++ is easier to learn than C. There will
be less type errors to catch manually (the C++ type system is stricter
and more expressive), fewer tricks to learn (C++ allows you to express
more things without circumlocution), and better libraries available.
The best initial subset of C++ to learn is not "all of C".

(http://www.research.att.com/~bs/bs_faq.html#prerequisite)

>> FWIW, you can create do object-oriented programming in C... just not
>> the same way you do in C++.
>>
>
>
> Only thing I can think of that C comes close to OOP would be the use of
> structs.

Well, it's not just using structs, it's a style of programming. The
original GTK+ GUI toolkit is object-oriented, although the main
programming interface is in C. In fact, the original C++ compilers
like CFront actually translated C++ into C and then that was what got
compiled.

Personally, though, I would never use C for OOP. :-)

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to