Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Some information for the one who decided to learn C++, and now wantsto learn at least a bit of C?

Reply
Thread Tools

Some information for the one who decided to learn C++, and now wantsto learn at least a bit of C?

 
 
Alexander
Guest
Posts: n/a
 
      09-06-2010
Some time ago I decided to learn C++, and most of the documentation I
found (books, tutorials, etc) said that not only is it not necessary
to learn C before, it is not recommended since it could make things
more difficult.

Now I know C++, but I deal a lot with various C software, and although
I understand it all, it is not at all easy to adapt it to my needs.

Where should I search for information? I couldn't find anything useful
on Google (and it's not that easy to find a good search query).

Could you advise me? Any responses are welcome.
 
Reply With Quote
 
 
 
 
BGB / cr88192
Guest
Posts: n/a
 
      09-06-2010

"Alexander" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Some time ago I decided to learn C++, and most of the documentation I
> found (books, tutorials, etc) said that not only is it not necessary
> to learn C before, it is not recommended since it could make things
> more difficult.
>
> Now I know C++, but I deal a lot with various C software, and although
> I understand it all, it is not at all easy to adapt it to my needs.
>
> Where should I search for information? I couldn't find anything useful
> on Google (and it's not that easy to find a good search query).
>
> Could you advise me? Any responses are welcome.


well, just my thoughts:
there are 2 major camps within C++ land.

the "C/C++" camp, who see C++ as mostly a superset of C, and will use
whatever styles from both languages they feel is most appropriate (and do
such "horrors" as use both languages in the same codebase, ...).

the "C++ purist" camp, who tends to see C++ more in relation to C# or Java,
and who tends to despise C and its C heritage. they are more likely the sort
of people who would make the previously mentioned comments.

these 2 camps fight in a sort of never-ending style-war...


personally, I tend to use mostly C, and use C++ "here and there", but tend
to use it rarely both as it creates problems for my technology, and because
really I don't usually need most of what it offers (most of its useful
features are either syntax sugar or can be otherwise easily done differently
in C).

also, one can do OO in C, the main thing about it is to not try to make it
syntactically resemble C++ (as this is where the pain starts). my "style"
then is much more influenced by other systems, such as Self and CLOS.

and, yes, a lot of this can be wrapped in C++-style classes, but usually I
don't bother...
(if I am writing C++ code, I personally have no fear of C-style API's...).

"style" is largely a false religion anyways...
no more valuable than nitpicking about when and where one puts their stupid
whitespace.
the compilers don't have reason to complain, and most humans should stop
complaining about pointless differences in convention or style.


it is about as "real" as people making a fuss over one "shouldn't" stir
their coffee with a knife or fork, and me being like "whatever dude...". I
really don't care what piece of silverware goes with what task, as long as
it works this is all that really matters...


so, effectively, I fall in a somewhat different camp...



 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      09-06-2010
On 09/ 7/10 07:20 AM, BGB / cr88192 wrote:
> "Alexander"<(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Some time ago I decided to learn C++, and most of the documentation I
>> found (books, tutorials, etc) said that not only is it not necessary
>> to learn C before, it is not recommended since it could make things
>> more difficult.
>>
>> Now I know C++, but I deal a lot with various C software, and although
>> I understand it all, it is not at all easy to adapt it to my needs.
>>
>> Where should I search for information? I couldn't find anything useful
>> on Google (and it's not that easy to find a good search query).
>>
>> Could you advise me? Any responses are welcome.

>
> well, just my thoughts:
> there are 2 major camps within C++ land.
>
> the "C/C++" camp, who see C++ as mostly a superset of C, and will use
> whatever styles from both languages they feel is most appropriate (and do
> such "horrors" as use both languages in the same codebase, ...).
>
> the "C++ purist" camp, who tends to see C++ more in relation to C# or Java,
> and who tends to despise C and its C heritage. they are more likely the sort
> of people who would make the previously mentioned comments.
>
> these 2 camps fight in a sort of never-ending style-war...


Do they? I wonder where...

--
Ian Collins
 
Reply With Quote
 
BGB / cr88192
Guest
Posts: n/a
 
      09-07-2010

"Richard" <(E-Mail Removed)> wrote in message
news:i64pra$h86$(E-Mail Removed)-september.org...
> Alexander <(E-Mail Removed)> writes:
>
>> Some time ago I decided to learn C++, and most of the documentation I
>> found (books, tutorials, etc) said that not only is it not necessary
>> to learn C before, it is not recommended since it could make things
>> more difficult.

>
> Bullshit.
>


probably fair enough, but these sorts of claims are often made by those
people who use C++ but despise C and so try to pretend that C++ is Java or
something and berate anyone who tries to "define" C++ by using "C-like"
API's or coding practices...

the problem then is that if a person knows C first, it is much more
difficult for them to ram all their crap down the newb's throat, as the newb
may realize that they actually have a choice, and that "style" is a matter
of both personal preference and utility, and not something which is set in
stone...


>>
>> Now I know C++, but I deal a lot with various C software, and although
>> I understand it all, it is not at all easy to adapt it to my needs.
>>
>> Where should I search for information? I couldn't find anything useful
>> on Google (and it's not that easy to find a good search query).
>>
>> Could you advise me? Any responses are welcome.

>
> Roll up your sleeves and read K&2 2. If you can program C++ then "your
> needs" are just a downgrade away.
>


well, unless the person has managed to only learn the "OO propaganda"
version of C++...
(newb: "what does the '*' mean between the class name and the variable
name?", response "!! it is pure evil! don't gaze into its existence any
further!"...).


but, anyways, I am not sure about "K&R 2", as I can't pull up info on it at
the moment.
but, ideally, any book the person uses to learn C should cover C89 and C99,
as older C variants are, anymore, not so much worth covering.



 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      09-07-2010
"BGB / cr88192" wrote:

> "Richard" <(E-Mail Removed)> wrote in message
> news:i64pra$h86$(E-Mail Removed)-september.org...
>> Alexander <(E-Mail Removed)> writes:
>>
>>> Some time ago I decided to learn C++, and most of the documentation I
>>> found (books, tutorials, etc) said that not only is it not necessary
>>> to learn C before, it is not recommended since it could make things
>>> more difficult.

>>
>> Bullshit.
>>

>
> probably fair enough, but these sorts of claims are often made by those
> people who use C++ but despise C and so try to pretend that C++ is Java or
> something and berate anyone who tries to "define" C++ by using "C-like"
> API's or coding practices...
>
> the problem then is that if a person knows C first, it is much more
> difficult for them to ram all their crap down the newb's throat, as the
> newb may realize that they actually have a choice, and that "style" is a
> matter of both personal preference and utility, and not something which is
> set in stone...
>
>
>>>
>>> Now I know C++, but I deal a lot with various C software, and although
>>> I understand it all, it is not at all easy to adapt it to my needs.
>>>
>>> Where should I search for information? I couldn't find anything useful
>>> on Google (and it's not that easy to find a good search query).
>>>
>>> Could you advise me? Any responses are welcome.

>>
>> Roll up your sleeves and read K&2 2. If you can program C++ then "your
>> needs" are just a downgrade away.
>>

>
> well, unless the person has managed to only learn the "OO propaganda"
> version of C++...
> (newb: "what does the '*' mean between the class name and the variable
> name?", response "!! it is pure evil! don't gaze into its existence any
> further!"...).
>
>
> but, anyways, I am not sure about "K&R 2", as I can't pull up info on it
> at the moment.
> but, ideally, any book the person uses to learn C should cover C89 and
> C99, as older C variants are, anymore, not so much worth covering.


In you first paragraphs you seem to advocate language tolerance. In you
last paragraph, by forcing C99 coverage you are excluding most of the
community of real C programmers, and the best manual ever written (K&R) for
*any* programming language. Most C programs are written in C89 with a dash
of C99 here and there.

I suggest the OP type <c99 compliant> in to Google before he tries to follow
your advice.


 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      09-07-2010
"BGB / cr88192" wrote:

> "osmium" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> "BGB / cr88192" wrote:
>>

>
> <snip>
>
>>>
>>>>>
>>>>> Now I know C++, but I deal a lot with various C software, and although
>>>>> I understand it all, it is not at all easy to adapt it to my needs.
>>>>>
>>>>> Where should I search for information? I couldn't find anything useful
>>>>> on Google (and it's not that easy to find a good search query).
>>>>>
>>>>> Could you advise me? Any responses are welcome.
>>>>
>>>> Roll up your sleeves and read K&2 2. If you can program C++ then "your
>>>> needs" are just a downgrade away.
>>>>
>>>
>>> well, unless the person has managed to only learn the "OO propaganda"
>>> version of C++...
>>> (newb: "what does the '*' mean between the class name and the variable
>>> name?", response "!! it is pure evil! don't gaze into its existence any
>>> further!"...).
>>>
>>>
>>> but, anyways, I am not sure about "K&R 2", as I can't pull up info on it
>>> at the moment.
>>> but, ideally, any book the person uses to learn C should cover C89 and
>>> C99, as older C variants are, anymore, not so much worth covering.

>>
>> In you first paragraphs you seem to advocate language tolerance. In you
>> last paragraph, by forcing C99 coverage you are excluding most of the
>> community of real C programmers, and the best manual ever written (K&R)
>> for *any* programming language. Most C programs are written in C89 with
>> a dash of C99 here and there.
>>

>
> AFAIK, the K&R manual mostly deals with pre-ANSI C?...
>
> like, its purpose was to form as a de-facto reference early on in the
> languages' development, prior to the standards coming along and largely
> regularizing everything and establishing a lot more of the more modern
> syntax and semantics.
>
>
> note that I listed both C89 and C99...
> the common subset of C89(AKA: C90) and C99, covers nearly all compilers
> currently in use.
>
> not so many pre-ANSI compilers are still in use.
>
>
> I still believe this is a position of tolerance, only that tolerance may
> be moderated by pragmatics.
> idealistic adherence to a particular style is pointless, but writing code
> which doesn't work (well or at all) is not useful either.
>
>
>> I suggest the OP type <c99 compliant> in to Google before he tries to
>> follow your advice.

>
> whoever said I was advocating trying to be "C99 only"?...


You said:

>any book the person uses to learn C should cover C89 and C99, as older C
>variants are, anymore, not so much worth covering.



You're a programmer and you are supposed to know what the word "and" means.
It seems now that you actually meant and/or, which has an entirely different
meaning, I have no problems if that is what you meant.


 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      09-07-2010
On 09/ 8/10 02:22 AM, BGB / cr88192 wrote:
> "Richard"<(E-Mail Removed)> wrote:
>> Alexander<(E-Mail Removed)> writes:
>>
>>> Some time ago I decided to learn C++, and most of the documentation I
>>> found (books, tutorials, etc) said that not only is it not necessary
>>> to learn C before, it is not recommended since it could make things
>>> more difficult.

>>
>> Bullshit.
>>

>
> probably fair enough, but these sorts of claims are often made by those
> people who use C++ but despise C and so try to pretend that C++ is Java or
> something and berate anyone who tries to "define" C++ by using "C-like"
> API's or coding practices...


Where do you get all this nonsense from? You must read some pretty
weird stuff.

>> Roll up your sleeves and read K&2 2. If you can program C++ then "your
>> needs" are just a downgrade away.

>
> well, unless the person has managed to only learn the "OO propaganda"
> version of C++...


Wow, something else I've never come across in almost 20 years of C++
programming.

--
Ian Collins
 
Reply With Quote
 
BGB / cr88192
Guest
Posts: n/a
 
      09-07-2010

"Richard Harter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Tue, 7 Sep 2010 11:14:37 -0500, "osmium"
> <(E-Mail Removed)> wrote:
>
>>"BGB / cr88192" wrote:
>>
>>> "osmium" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> "BGB / cr88192" wrote:
>>>>
>>>
>>> <snip>
>>>
>>>>>
>>>>>>>
>>>>>>> Now I know C++, but I deal a lot with various C software, and
>>>>>>> although
>>>>>>> I understand it all, it is not at all easy to adapt it to my needs.
>>>>>>>
>>>>>>> Where should I search for information? I couldn't find anything
>>>>>>> useful
>>>>>>> on Google (and it's not that easy to find a good search query).
>>>>>>>
>>>>>>> Could you advise me? Any responses are welcome.
>>>>>>
>>>>>> Roll up your sleeves and read K&2 2. If you can program C++ then
>>>>>> "your
>>>>>> needs" are just a downgrade away.
>>>>>>
>>>>>
>>>>> well, unless the person has managed to only learn the "OO propaganda"
>>>>> version of C++...
>>>>> (newb: "what does the '*' mean between the class name and the variable
>>>>> name?", response "!! it is pure evil! don't gaze into its existence
>>>>> any
>>>>> further!"...).
>>>>>
>>>>>
>>>>> but, anyways, I am not sure about "K&R 2", as I can't pull up info on
>>>>> it
>>>>> at the moment.
>>>>> but, ideally, any book the person uses to learn C should cover C89 and
>>>>> C99, as older C variants are, anymore, not so much worth covering.
>>>>
>>>> In you first paragraphs you seem to advocate language tolerance. In
>>>> you
>>>> last paragraph, by forcing C99 coverage you are excluding most of the
>>>> community of real C programmers, and the best manual ever written (K&R)
>>>> for *any* programming language. Most C programs are written in C89
>>>> with
>>>> a dash of C99 here and there.
>>>>
>>>
>>> AFAIK, the K&R manual mostly deals with pre-ANSI C?...
>>>
>>> like, its purpose was to form as a de-facto reference early on in the
>>> languages' development, prior to the standards coming along and largely
>>> regularizing everything and establishing a lot more of the more modern
>>> syntax and semantics.
>>>
>>>
>>> note that I listed both C89 and C99...
>>> the common subset of C89(AKA: C90) and C99, covers nearly all compilers
>>> currently in use.
>>>
>>> not so many pre-ANSI compilers are still in use.
>>>
>>>
>>> I still believe this is a position of tolerance, only that tolerance may
>>> be moderated by pragmatics.
>>> idealistic adherence to a particular style is pointless, but writing
>>> code
>>> which doesn't work (well or at all) is not useful either.
>>>
>>>
>>>> I suggest the OP type <c99 compliant> in to Google before he tries to
>>>> follow your advice.
>>>
>>> whoever said I was advocating trying to be "C99 only"?...

>>
>>You said:
>>
>>>any book the person uses to learn C should cover C89 and C99, as older C
>>>variants are, anymore, not so much worth covering.

>>
>>
>>You're a programmer and you are supposed to know what the word "and"
>>means.
>>It seems now that you actually meant and/or, which has an entirely
>>different
>>meaning, I have no problems if that is what you meant.

>
> Er, to tell the truth, I have no idea what you think or thought
> he meant, and what you wrote had to do with what he wrote. I
> understood him to be saying that older variants, i.e. those
> preceding C89 are not worth covering. On the other hand it
> should cover both C89 and C99. What on earth do you think "and"
> means?
>


yes, this is more what I meant...

stuff before C89 is sort of crufty and has much variation and little
standardization, and so is not as useful trying to learn it.

hence, C89 and C99, as in, it is good to look into both, and know what each
supports and what each lacks, ...



 
Reply With Quote
 
BGB / cr88192
Guest
Posts: n/a
 
      09-07-2010

"Keith Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "BGB / cr88192" <(E-Mail Removed)> writes:
> [...]
>> AFAIK, the K&R manual mostly deals with pre-ANSI C?...

> [...]
>
> The first edition of Kernighan & Ritchie's "The C Programming
> Language" (K&R1) covers the C language as it existed in 1978, long
> before the ANSI standard. This version of the language is often
> referred to as "K&R C", and is largely obsolete.
>


this is what I was originally concerned over.

since my search on "K&R 2" didn't turn up much, I was unsure and thinking
maybe it was a reference to this older book (since most people make a new
edition of a book every few years or so, and I wasn't sure what the actual
name of the book was, ...).


> The second edition, K&R2, covers the language described by the
> 1989 ANSI C standard and the 1990 ISO C standard. (My copy says
> "Based on Draft-Proposed ANSI C" on the cover; later printings have
> different wording.)
>
> There are no plans for a K&R3 to cover C99.
>


ok, yes...

so then these are probably a good reference then...



 
Reply With Quote
 
BGB / cr88192
Guest
Posts: n/a
 
      09-08-2010

"Ian Collins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On 09/ 8/10 02:22 AM, BGB / cr88192 wrote:
>> "Richard"<(E-Mail Removed)> wrote:
>>> Alexander<(E-Mail Removed)> writes:
>>>
>>>> Some time ago I decided to learn C++, and most of the documentation I
>>>> found (books, tutorials, etc) said that not only is it not necessary
>>>> to learn C before, it is not recommended since it could make things
>>>> more difficult.
>>>
>>> Bullshit.
>>>

>>
>> probably fair enough, but these sorts of claims are often made by those
>> people who use C++ but despise C and so try to pretend that C++ is Java
>> or
>> something and berate anyone who tries to "define" C++ by using "C-like"
>> API's or coding practices...

>
> Where do you get all this nonsense from? You must read some pretty weird
> stuff.
>


much of it comes from usenet...

just how many flame wars have I read over the years?... hell, I don't
know...


>>> Roll up your sleeves and read K&2 2. If you can program C++ then "your
>>> needs" are just a downgrade away.

>>
>> well, unless the person has managed to only learn the "OO propaganda"
>> version of C++...

>
> Wow, something else I've never come across in almost 20 years of C++
> programming.
>


yes, but I have been doing > 10 years of usenet posting, and I have heard
all sorts of claims...

now, whether or not this is a majority position, or is just held by the
occasional troll, I have little idea...

I recently ran into a teacher in a class IRL who was going on like this
(very much one of those "C is arcane", "the only true way to do programming
is through Visual Studio", ...) people.

and, yes, they exist...

they exist, they occasionaly make themselves known on usenet, and they teach
introductory programming classes at community colleges...

I don't know as much what most real-life people are like, as, sadly, my
social life doesn't extend too far beyond the borders of usenet and the
occasional web forum at this point...

in the "real world", I almost don't really exist...



 
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
SWF 11 player now supports only some 64-bit OSs using 64-bit browsers cwdjrxyz HTML 0 10-22-2011 07:15 AM
What is the point of having 16 bit colour if a computer monitor can only display 8 bit colour? How do you edit 16 bit colour when you can only see 8 bit? Scotius Digital Photography 6 07-13-2010 03:33 AM
Need regular expression for at least 7 characters and at least 1 special chatacter AAaron123 ASP .Net 0 10-03-2008 01:25 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Computer Support 0 09-17-2004 08:15 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments