Jump to content

Is it worth learning C now?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
114 replies to this topic

#1
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
With C++ out, and it's OOP, is it worth learning C anymore? From what I've read, C++ is, well, better, and I want to learn a programming language. Should I just forget about C and go with C++?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I wouldn't waste much time learning C. If you learn C++ you also learn C. C++ is the better language.

#3
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
That's what I thought. And they are so similar, it really is pointless studying them separately.

#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I agree. Learn ANSI C++ and then move on to application programming. Are you learning for Windows, Linux, Mac or other?

Once you learn ANSI C++, you have learned C as well.

#5
MrDiaz

MrDiaz

    Learning Programmer

  • Members
  • PipPipPip
  • 65 posts
hmm not quite my friends. C is still a major language, and the difference is that is a low level programming language. It works pretty much as assembly, directly with the processor.

Why do you think Operating Systems are written using C and not other language. Using C you get to control more the memory management of your operating systems as well as more directly the flow of your application. There are many things why you should learn C is that what you really are aiming for.

So it depends on what your goal is and where you're heading at in your professional life.

Hope that helps,

#6
Void

Void

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 411 posts

MrDiaz said:

hmm not quite my friends. C is still a major language, and the difference is that is a low level programming language. It works pretty much as assembly, directly with the processor.

Why do you think Operating Systems are written using C and not other language. Using C you get to control more the memory management of your operating systems as well as more directly the flow of your application. There are many things why you should learn C is that what you really are aiming for.

So it depends on what your goal is and where you're heading at in your professional life.

Hope that helps,

Thats all true. I still agree with Jordan though. If you spend your time learning C++ you will learn C as well. It'd be better learning C++ then switching back to C.
Void

#7
MrDiaz

MrDiaz

    Learning Programmer

  • Members
  • PipPipPip
  • 65 posts
well it all depends on the learner's ability, but usually. You do not learn to drive a car without learning how to ride a bike ;)

#8
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
I stand by my position of learning only C++, although it couldn't hurt to try to learn some C alongside it to gain a further understanding of both languages.

#9
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
I think you should learn C, dabble in C++ - and then drop both. Unless you're writing an OS, or the next RDBMS*, C/C++ is more trouble than it's worth. Use a managed language, get finished in half the time with half the bugs.

*Slight hyperbole. There are instances where C/C++ make sense. If you don't already know that you need it though, you almost assuredly don't.

#10
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
I thought you could use C++ for a lot of other things besides writing big stuff like operating systems or video games, people make applications with it too.

#11
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Sure - like I said, I exaggerate a bit. There's a lot of existing investment in C++ codebases, and that stuff has to be maintained and extended. For new development though, I don't see the benefit. Some folks will howl and cry about the large size of managed frameworks, and the "performance hit" of garbage collected languages - but I think most of that is C++ coders protecting turf.

As for business development, there's no contest. VB used to be the king of business development because it'd take you 1/4 the time to develop it vs. C++. Of course, you paid for that with increased maintenance costs because of a limited language. Now, with .NET (or Java), you can have the speed of development of VB, with a language as powerful as C++....what's not to like?

Of course, I think C/C++ is still worth knowing, as it'll make you understand what higher level languages like Java/C# are doing for you. That way, you'll never want to go back. ;)

#12
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts

Jordan said:

I wouldn't waste much time learning C. If you learn C++ you also learn C. C++ is the better language.

I can only half agree with Jordan. I wouldn't waste time learning C. However, if you learn C++ you will not learn C, unless you are using a book that teaches you to do everything the "C way" instead of the "C++ way".

For example:
#include "stdio.h"
void main(){
  printf("Hello world.\n");
}
Is your most basic C program.

#include <iostream>
int main(){
  std::cout << "Hello world.\n";
  return 0;
}
is your most basic C++ program. If you learn C++, you will be able to pick up C quite easily, but you are definitely not learning C. Moreover, C++ accomodates some very different approaches to thinking about problems from C. Once you learn C++, C will feel very restrictive.