C or C++?

G

Gianni Mariani

It's already been noted though that they are "gifted"
(intellectually/technically) over at Comeau. If it's inaccessible to "the
layman", it's probably just as bad. If 'export' has to do with dynamic
linking, it sounds like something I want. If it goes "way overboard" into
binary compatibilty of objects, I can probably do without it.

John

It may be easier to implement a binary independant format. If you're
generating code, you may as well generate all the code rather than
some of the code.

Having said that, there are some interesting new failure modes that
need to be considered.
 
C

Carlo Milanesi

(e-mail address removed) ha scritto:
I am a newbie to programming, and sorry again that I have to ask the C
or C++ questions. Is C required before learning C++? And become better
in C does it also make you a better C++ programmer? Or that to be a C+
+ programmer, it's better not to have any knowledge of C and start a
new in the C++ way as some books suggest?

I know many persons that can program in C++, but I don't know a single
C++ professional programmers that cannot program in C.
I think that the only persons that can program in C++ and cannot program
in C are hobbyists or persons who studied programming but never practiced
it as a job.
This comes form the following facts:
* The C programmers and the C++ programmers markets overlap. Often a
company needs a person that is proficient in both, and often C++
programmers are hired to write software in C.
* Many libraries used by C++ programs have a C interface.
* Many libraries built using C++ must have a C interface.
* A lot of code, originally written in C, now has parts in C++ and parts
in C or in C-like C++.
* Many (old) programmers used C in the eighties and nineties and then
migrated to C++.

Therefore, I recommend to learn also C to everyone who wants to become a
professional C++ programmer. It's not important to order, but it's
better to know both.

In addition, I think it's far easier to learn C++ when you know C, than
when you know only another language. But it's also far easier to learn C
when you know C++. So the time to learn both is much shorter than the
sum of the times to learn each of them.

And I think there are never concepts to be "unlearn", just to be "set
aside". For instance, many say "in C++ you should forget about malloc";
but a lot of literature talks about malloc, and if you don't have an
idea of what it's talking about, you can't understand that literature.
 
H

Herhor

Carlo Milanesi pisze:
(e-mail address removed) ha scritto:

I know many persons that can program in C++, but I don't know a single
C++ professional programmers that cannot program in C.
I think that the only persons that can program in C++ and cannot program
in C are hobbyists or persons who studied programming but never practiced
it as a job.
This comes form the following facts:
* The C programmers and the C++ programmers markets overlap. Often a
company needs a person that is proficient in both, and often C++
programmers are hired to write software in C.
* Many libraries used by C++ programs have a C interface.
* Many libraries built using C++ must have a C interface.
* A lot of code, originally written in C, now has parts in C++ and parts
in C or in C-like C++.
* Many (old) programmers used C in the eighties and nineties and then
migrated to C++.

Therefore, I recommend to learn also C to everyone who wants to become a
professional C++ programmer. It's not important to order, but it's
better to know both.

In addition, I think it's far easier to learn C++ when you know C, than
when you know only another language. But it's also far easier to learn C
when you know C++. So the time to learn both is much shorter than the
sum of the times to learn each of them.

And I think there are never concepts to be "unlearn", just to be "set
aside". For instance, many say "in C++ you should forget about malloc";
but a lot of literature talks about malloc, and if you don't have an
idea of what it's talking about, you can't understand that literature.

Don't listen this bullshits!
An antiquated C language is now outdated and only old lazy coders who
can't understand and learn object oriented languages seek naive persons
to hire them as a new C programmers. It is fully understood from their
perspective because otherwise these lazy C-guys would share dinosaurs'
fate along with rubbish C language.
Don't listen anything about C superiority and popularity. All things you
can do in C can also be done in C++ in much simpler and secure way! In
reality now 95% professional code is written in C++ not C. Only in so
called GNU programing area C and C++ are equals.
 
C

Carlo Milanesi

Herhor said:
An antiquated C language is now outdated and only old lazy coders who
can't understand and learn object oriented languages seek naive persons
to hire them as a new C programmers.
Are coders who seek persons to hire as programmers? No, they are
managers or businessmen.
In reality now 95% professional code is written in C++ not C.
Where did you get such figures? I look here, where C looks still more
popular than C++:
http://www.tiobe.com/index.htm?tiobe_index
Perhaps, most C programmers now build embedded systems or device
drivers, and few build applications for Windows or Unix, but
nevertheless they are professional computer programmers.
 
H

Herhor

Carlo Milanesi pisze:
Are coders who seek persons to hire as programmers? No, they are
managers or businessmen.

It is simple! There are business managers who hired old C coders to seek
naive beginning programmers to hire them as their programming in C
successors.
Where did you get such figures? I look here, where C looks still more
popular than C++:
http://www.tiobe.com/index.htm?tiobe_index
Perhaps, most C programmers now build embedded systems or device
drivers, and few build applications for Windows or Unix, but
nevertheless they are professional computer programmers.

Because I didn't take into account programming cell phones, iPods,
microwave kitchens and similar shit but computer systems only.
Moreover, firstly as for now C competes mainly _with Java_ not C++ in
the embedded systems area, secondly _many people_ don't know that it is
possible to write OS kernels, device drivers or embedded programs in C++
which are *more compact and efficient* than similar ones wrote in C!
 
H

Herhor

Carlo Milanesi pisze:
I look here, where C looks still more popular than C++:
http://www.tiobe.com/index.htm?tiobe_index

Additionally this rating is idiotic!
How can they compare native programming languages (C, C+), interpreted
languages (C#, Java) and Internet script pseudo-languages (PHP, Perl,
Javascript) regardless of their structural differences and very diverse
area of application???
 
P

persenaama

Don't listen this bullshits!
:)


An antiquated C language is now outdated and only old lazy coders who
can't understand and learn object oriented languages seek naive persons
to hire them as a new C programmers. It is fully understood from their
perspective because otherwise these lazy C-guys would share dinosaurs'
fate along with rubbish C language.

Don't we all know that? We subscribe to comp.lang.c++, the point isn't
if we agree with your "evaluation" above, but if it is relevant to the
real world. Like it or not, C is still around and pooping on the
parties all around the coding world. WIN32. C. OpenGL. C. On and on.
It just keeps coming up.

If you don't know about C, and how it relates to C++, how can you know
that passing address-of std::vector<float> isn't the Right Thing to do
for ::glVertexAttribPointer4fv ? You don't; and you're FUCKED.

I said I don't like C much? I have to use it anyway. It's used for ARM
development in hand helds a great deal. Symbian might be really
perverted C++, but the tools are so *****ing old that it can hardly be
called C++ .. but that's different sad story in itself.

You're right from your point of view; YOU don't need C, right, so I'm
curious, what DO you program? What tools you use, what software you
write precisely that you don't need C knowledge. At all.
 
H

Herhor

persenaama pisze:
Like it or not, C is still around and pooping on the
parties all around the coding world. WIN32. C. OpenGL. C. On and on.
It just keeps coming up.

Are you serious??? So migrate to the "comp.lang.c-ircus" then! You will
find several other funny weirdos there! :)
I said I don't like C much? I have to use it anyway.

If so, it simply proves you don't know C++ *at all*, buddy! :)
You're right from your point of view; YOU don't need C, right, so I'm
curious, what DO you program? What tools you use, what software you
write precisely that you don't need C knowledge. At all.

I am coding many things in C++ without C knowledge (except their
partially common instruction set of course) in contrary to your coding
work which seems to be centered on programming /speaking dolls/ only! :)
 
B

Bo Persson

persenaama wrote:
::: Don't listen this bullshits!
::
:: :)
::
::
::: An antiquated C language is now outdated and only old lazy coders
::: who can't understand and learn object oriented languages seek
::: naive persons to hire them as a new C programmers. It is fully
::: understood from their perspective because otherwise these lazy
::: C-guys would share dinosaurs' fate along with rubbish C language.
::
:: Don't we all know that? We subscribe to comp.lang.c++, the point
:: isn't if we agree with your "evaluation" above, but if it is
:: relevant to the real world. Like it or not, C is still around and
:: pooping on the parties all around the coding world. WIN32. C.
:: OpenGL. C. On and on. It just keeps coming up.
::
:: If you don't know about C, and how it relates to C++, how can you
:: know that passing address-of std::vector<float> isn't the Right
:: Thing to do for ::glVertexAttribPointer4fv ? You don't; and you're
:: FUCKED.

If you have learned proper C++, you would never have come up with the
idea of passing the address of a std::vector in the first place.

If you want to learn C, learn C.

If you want to learn C++, learn C++.

If you want to learn Java, learn Java.


The fact that these languages have a few braces and type names in
common, does not mean that learning one of them is any advantage when
learning another one. On the contrary!


Bo Persson
 
H

Herhor

Bo Persson pisze:
:: If you don't know about C, and how it relates to C++, how can you
:: know that passing address-of std::vector<float> isn't the Right
:: Thing to do for ::glVertexAttribPointer4fv ? You don't; and you're
:: FUCKED.

If you have learned proper C++, you would never have come up with the
idea of passing the address of a std::vector in the first place.

Right!
Recently too many ridiculous guys here claim to be fluent in all
programming languages with "/old good C/" in the forefront of others.
However they don't know much _about any of them_. Yet in closer look
these omniscient braggarts often are permanent habitués of
"comp.lang.c-ircus" newsgroup. :)
 
P

persenaama

Are you serious??? So migrate to the "comp.lang.c-ircus" then! You will
find several other funny weirdos there! :)

Why would I? Do you have reading comprehension troubles, I said I
don't like C.

If so, it simply proves you don't know C++ *at all*, buddy! :)

How that proves I don't know C++ at all, please be more specific.

I am coding many things in C++ without C knowledge (except their
partially common instruction set of course) in contrary to your coding
work which seems to be centered on programming /speaking dolls/ only! :)

You didn't answer the question; "many things" isn't really an answer.
What do you program using C++?
 
P

persenaama

The fact that these languages have a few braces and type names in
common, does not mean that learning one of them is any advantage when
learning another one. On the contrary!

C and C++ have more than just few braces and type names in common; one
is the subset of the other.
 
B

Bo Persson

persenaama wrote:
::: The fact that these languages have a few braces and type names in
::: common, does not mean that learning one of them is any advantage
::: when learning another one. On the contrary!
::
:: C and C++ have more than just few braces and type names in common;
:: one is the subset of the other.

In theory yes, but in practice there are large parts of the C subset
that isn't very useful in C++. Why bother to learn about things like:

malloc and strcpy
why s1 == s2 is different from strcmp(s1, s2)
why you have library functions named abs, fabs, labs, cabs, etc - why
not just overload abs?
what does printf("/!%%!%¤#") really mean (if anything)
how to use an address passed by value to simulate a pass by reference
how to use name prefixes to simulate namespaces
how to use variadic functions instead of overloads with different
number of parameters



Bo Persson
 
H

Herhor

Bo Persson pisze:
In theory yes, but in practice there are large parts of the C subset
that isn't very useful in C++. Why bother to learn about things like:

malloc and strcpy
why s1 == s2 is different from strcmp(s1, s2)
why you have library functions named abs, fabs, labs, cabs, etc - why
not just overload abs?
what does printf("/!%%!%¤#") really mean (if anything)
how to use an address passed by value to simulate a pass by reference
how to use name prefixes to simulate namespaces
how to use variadic functions instead of overloads with different
number of parameters

And many, many more!

I see only one reason to learn all above useless shit: to become _dorky
member_ of "comp.lang.c-ircus" *squirrely newsgroup*! :)
 
J

jacob navia

Herhor said:
Bo Persson pisze:

This is still the case in C++ unless s1 and s2 are something
else than character strings!

Well, abs *is* overloaded in C.

One of the thing it would be nice in this discussion is that
you would know what you are talking about.

Namespaces are easy to do that way.
Why complicate the language unnecessarily?
And many, many more!

I see only one reason to learn all above useless shit: to become _dorky
member_ of "comp.lang.c-ircus" *squirrely newsgroup*! :)

I agree that many members of that newsgroup have weird views, and I have
been atacked by those people a number of times...

But the problem is not those people. It is that those people have
reduced that group to a forum for themselves, and the users of
C that are open minded are completely discouraged to participate.
 
J

jacob navia

osmium said:
Do you have some private meaning for "overloaded" that the rest of don't
share?

Or what?

In the C standard, the tgmath.h header file is specified.
That header file specifies that "abs" should accept float/double/long
double/ arguments and should internally call absf, etc etc.

Many other functions like sqrt are specified in this "overloaded" way.

Some C compilers go beyond that and accept

int overloaded fn(/* args */);

for true overloaded functions, for instance lcc-win32.

jacob
 
H

Herhor

jacob navia pisze:
I agree that many members of that newsgroup have weird views, and I have
been atacked by those people a number of times...

But the problem is not those people. It is that those people have
reduced that group to a forum for themselves, and the users of
C that are open minded are completely discouraged to participate.

Yes, I discovered this after participating _just in one thread_. This
narrow-minded clique together with their bozo newsgroup should be
ignored or kicked ass around if they insult someone too much.

However there is another moderated newsgroup about C. Is it also
controlled by these jerks???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top