Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C and C++

Reply
Thread Tools

C and C++

 
 
Jim Langston
Guest
Posts: n/a
 
      03-04-2006
"BigBrian" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Michael Redlich wrote:
>> Phlip wrote:
>>
>> >
>> > C++ is C with a few keywords added and just a couple bugs removed.
>> >

>>
>> A person graduating from C to C++ has somewhat of a steep
>> learning curve if he/she wants to develop good, quality code.

>
> Your statement sounds like you're infering that C++ is better than C
> since you suggest that people graduate from C to C++. This really
> isn't true in every case, both languages have tasks for which each is
> better than the other. The linux kernel is writen in C, not C++. I
> would bet most of the developers for the linux kernel would take issue
> with the statement that they needed to graduate to C++.


I read an article (web page discussion) about why the linux kernal is still
in C and not C++. They had looked at implementing it in C++ but new would
give them many of problems. In a kernal memory is allocated in many
differnt places, since the kernal is the one that is ultimately responsible
for allocating the memory that new uses.

They could of used C++ if they were to limit uses of new, but it was decided
that since a lot of people work on the kernal that some programmer wouldn't
be aware of all the limitations and use new where they weren't supposed to
(or even std templates that use alloc such as std::string) and break things.

From what I read they would of used C++ for the kernal if they could without
these problems. So it wasn't a fact of C++ being inferior to C, but the
fact that wasn't the best language for the use.

If I program on an AS/400 I'll most likely use RPG (Report Program
Generator) even though you can get a C or C++ compiler. RPG is not better
than C or C++, but it is the most appropriate langauge for the use.

Also, it could be argued that C is a subset of C++, or C++ is a superset of
C. You can still program a C program in C++ without using any of the C++
objects or such with minimal changes.

In my opionion, no langauge is better than any other langauge. Languages
are designed with specific purposes in mind when they are designed. If they
are used for that purpose, then they are probably the best langauge for that
purpose.


 
Reply With Quote
 
 
 
 
Michael Redlich
Guest
Posts: n/a
 
      03-04-2006

BigBrian wrote:

> > >

> >
> > A person graduating from C to C++ has somewhat of a steep
> > learning curve if he/she wants to develop good, quality code.

>
> Your statement sounds like you're infering that C++ is better than C
> since you suggest that people graduate from C to C++. This really
> isn't true in every case, both languages have tasks for which each is
> better than the other. The linux kernel is writen in C, not C++. I
> would bet most of the developers for the linux kernel would take issue
> with the statement that they needed to graduate to C++.
>


I don't see how my statement implied that C++ is *better* than C. I
was merely trying to point out that there is more to learning C++ than
Philip seemed to make it out to be. Maybe I shouldn't have used the
term "graduated." It was simply a metaphor for someone who is a C
developer that is interested in learning C++. I also should have said,
"good, quality C++ code."

> >
> > True, one can essentially create an "object" using the struct
> > mechanism.

>
> True, but that's not enough to support OOP. You also need to implement
> your own way of handling dynamic binding to support polymorphism.
>


I also didn't say that you could *fully* support OOP with C. That's
why I use C++ and Java...

That's the problem with these Usenet groups. There's no face-to-face
interaction, and there's potential for misunderstandings because these
groups are global. I'm from New Jersey, and you all know how we talk
over here: "Yea, I'm from Joisey..."

Mike.

-----
ACGNJ Java Users Group
http://www.javasig.org/

 
Reply With Quote
 
 
 
 
Michael Redlich
Guest
Posts: n/a
 
      03-04-2006

Jim Langston wrote:
>
> In my opionion, no langauge is better than any other langauge. Languages
> are designed with specific purposes in mind when they are designed. If they
> are used for that purpose, then they are probably the best langauge for that
> purpose.


Amen, brother! I couldn't agree more...

Mike.

-----
ACGNJ Java Users Group
http://www.javasig.org/

 
Reply With Quote
 
Jerry Coffin
Guest
Posts: n/a
 
      03-04-2006
In article <037Of.250$(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...

[ ... ]

> In my opionion, no langauge is better than any other langauge. Languages
> are designed with specific purposes in mind when they are designed. If they
> are used for that purpose, then they are probably the best langauge for that
> purpose.


Obviously you've never tried to use Intercal, UnLambda or
brainf*(k. Some languages are definitely worse than
anything that could possibly be considered rational, sane
or intelligent.

--
Later,
Jerry.

The universe is a figment of its own imagination.
 
Reply With Quote
 
TB
Guest
Posts: n/a
 
      03-04-2006
Jim Langston skrev:
<snip>
>
> In my opionion, no langauge is better than any other langauge. Languages
> are designed with specific purposes in mind when they are designed. If they
> are used for that purpose, then they are probably the best langauge for that
> purpose.
>
>


Well, most commercial languages are classified as "general-purpose",
hence lack the fourth generation specialization. But they do have
different designs that easier promotes the langauges over others in
certain problem domains (today most obvious on the oop stage).

--
TB @ SWEDEN
 
Reply With Quote
 
TB
Guest
Posts: n/a
 
      03-04-2006
Jerry Coffin skrev:
> In article <037Of.250$(E-Mail Removed)>,
> (E-Mail Removed) says...
>
> [ ... ]
>
>> In my opionion, no langauge is better than any other langauge. Languages
>> are designed with specific purposes in mind when they are designed. If they
>> are used for that purpose, then they are probably the best langauge for that
>> purpose.

>
> Obviously you've never tried to use Intercal, UnLambda or
> brainf*(k. Some languages are definitely worse than
> anything that could possibly be considered rational, sane
> or intelligent.
>


You mean "brain****".

Esoteric languages are their own language group with their own purpose,
just like all pure research languages produced. And UnLambda has some
very interesting properties that should not be shrugged off as something
"worse than anything that could possibly be considered rational".

--
TB @ SWEDEN
 
Reply With Quote
 
JustBoo
Guest
Posts: n/a
 
      03-04-2006
On Fri, 03 Mar 2006 22:36:33 GMT, "Mike Wahler"
<(E-Mail Removed)> wrote:

>C++ isn't *only* an OOP language. One can
>write procedural code with it as well. Both
>C and C++ can be considered 'general purpose'
>languages.


Oooo, boy...

http://en.wikipedia.org/wiki/Procedural_code

"In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move."
- Douglas Adams
 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      03-04-2006
JustBoo wrote:

Mike Wahler mkwahler wrote:
>
>>C++ isn't *only* an OOP language. One can
>>write procedural code with it as well. Both
>>C and C++ can be considered 'general purpose'
>>languages.


That's the party line. Let's just say the paradigm that sucks under C++
least is OOP.

> Oooo, boy...
>
> http://en.wikipedia.org/wiki/Procedural_code


The opposite of "procedural" is "event driven". OOP enables that, but it's
not the opposite of "procedural".

> "In the beginning the Universe was created. This has made a lot of
> people very angry and has been widely regarded as a bad move."
> - Douglas Adams


How dare you cite holy scripture in a public forum??!

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!


 
Reply With Quote
 
Neil Cerutti
Guest
Posts: n/a
 
      03-06-2006
On 2006-03-04, osmium <(E-Mail Removed)> wrote:
> "wilberX" writes:
>
>>How much knowledge of C is
>> required to understand C++? Thanks.

>
> None at all is required. C++ is a complete (albeit irritating) free
> standing language


Nearly. You are stuck with the C standard library for certain things,
and you won't find that library documented in the C++ Standard.

--
Neil Cerutti
 
Reply With Quote
 
Ron Natalie
Guest
Posts: n/a
 
      03-08-2006
Phlip wrote:
> wilberX wrote:
>
>> I have a question on how closely C and C++ are related. If i am
>> correct C++ is OOP while C is not. Now how closely can an OOP language
>> and a procedural language be related? How much knowledge of C is
>> required to understand C++? Thanks.

>
> To what purpose will you put the answer?
>
> C++ is C with a few keywords added and just a couple bugs removed.


And unfortunately a more than a few bugs propagated.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments