Page 1 of 1
C and C++ at the same time?
Posted: Sat Oct 09, 2010 10:09 am
by MisterReplicant
I've learned different languages at the same time (HTML and Javascript) and done fine. But, I heard that you SHOULD learn C++ first, because if you learn C THEN C++ you must un-learn bad habits.
I am learning C++ on my Mac on XCode and I am going to be getting an Arduino soon, I program that in C. Is it possible to learn C++ and C at the same time? (well, of course it is POSSIBLE, but SHOULD I do it??)
Thanks.
~MR
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 11:24 am
by davidthefat
MisterReplicant wrote:I've learned different languages at the same time (HTML and Javascript) and done fine. But, I heard that you SHOULD learn C++ first, because if you learn C THEN C++ you must un-learn bad habits.
I am learning C++ on my Mac on XCode and I am going to be getting an Arduino soon, I program that in C. Is it possible to learn C++ and C at the same time? (well, of course it is POSSIBLE, but SHOULD I do it??)
Thanks.
~MR
Well I can hardly say Arduino is programmed in C, it has a very C like syntax, but it is not C
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 11:40 am
by MisterReplicant
davidthefat wrote:MisterReplicant wrote:I've learned different languages at the same time (HTML and Javascript) and done fine. But, I heard that you SHOULD learn C++ first, because if you learn C THEN C++ you must un-learn bad habits.
I am learning C++ on my Mac on XCode and I am going to be getting an Arduino soon, I program that in C. Is it possible to learn C++ and C at the same time? (well, of course it is POSSIBLE, but SHOULD I do it??)
Thanks.
~MR
Well I can hardly say Arduino is programmed in C, it has a very C like syntax, but it is not C
Really?? I thought I saw somewhere it was C... So what language would it be considered? (Low-level, right?)
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 11:49 am
by dandymcgee
Well the beginnings of C++ are much like C anyways, I've never gone looking explicitly for C tutorials, but I feel like I have a good understanding of it just from using C++ for so long and catching other people's old C habits in their C++ code. Once you get passed the basics in C++ and start heading toward OO concepts you're going in the complete opposite direction of C, that's when you'd have to realize and understand the differences.
Stream vs. printf
String vs. char*
Class vs. struct
If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 12:42 pm
by Ginto8
dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 3:47 pm
by dandymcgee
Ginto8 wrote:dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 9:28 pm
by MisterReplicant
dandymcgee wrote:Ginto8 wrote:dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?
So you are saying have a solid understanding of C before C++?
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 9:30 pm
by Ginto8
MisterReplicant wrote:dandymcgee wrote:Ginto8 wrote:dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?
So you are saying have a solid understanding of C before C++?
I recommend learning both. However, the one you are probably going to actually need more is C++, so that's the priority.
Re: C and C++ at the same time?
Posted: Sat Oct 09, 2010 10:18 pm
by dandymcgee
MisterReplicant wrote:dandymcgee wrote:Ginto8 wrote:dandymcgee wrote:If you have a solid understanding of C++ it's easy to read straight C, and only slightly more difficult to write it.
yes and no. C has some quirks that C++ doesn't, and vice versa. They have different paradigms usually. So I wouldn't say that C is more difficult to write than C++, it just usually uses different paradigms than C++.'
Which makes it more difficult if you have a solid understanding of C++ and not one of C, no?
So you are saying have a solid understanding of C before C++?
No, I'm saying the two languages are close enough that no matter which you choose it will ease the learning of the other later on.
Ginto8 wrote:I recommend learning both. However, the one you are probably going to actually need more is C++, so that's the priority.
That's solely your opinion, and I agree with it. Go with C++ then go back and look at something written in straight C later on.
Re: C and C++ at the same time?
Posted: Sun Oct 10, 2010 9:35 am
by MisterReplicant
Will do! Thank you everybody!