Should I learn C++ as a first language?

I was wondering if I should learn C++ as my first language. I'm a linux user so programming would be very important for a person like me. I tried learning Java a couple months ago, but I was quickly disgusted at it because of its inability to be a serious language. I want to learn C++ or C, but I'm not sure which one to choose. I started learning the beginning's of each language(basic syntax, I/O, and data types), I found C to have much shorter syntax than C++ when it came to small programs, but found C++ much more efficient when it came to longer programs. The reason I want to learn a programming language is to maybe make a office programs, desktop Environments, and maybe cli shells. So what do you guys think.
If you want to make office programs and shells, then learning both C++ and C would seem sensible. I wouldn't listen to anyone who says learning it as a first language is too hard or whatever.

And Java is a serious language!
C++ is C with a ton of extended features and libraries. If you're choosing between one of the two choose C++ because they're exactly the same language. That is, you can use old deprecated C functions in a C++ program if you really wanted to (although not necessarily the other way around).
Much like a square is a rectangle but a rectangle isn't necessarily a square.

C++ was my first language, and I think it turned out pretty well.
Also, I heard that C is used for system drivers and low level things, but can't C++ do it even better?
Like I said, they're essentially one in the same. You can use C++ techniques in low level things like system drivers if you want to. It's not really a question of doing it "better," rather, which one you prefer and which of several techniques are easier/more suitable to accomplish the same task.
What about libraries? Which one has more?

And another question: what about the d programming language? Is it better than c++?
C code produces smaller binaries (.exe files) and becomes increasingly desirable as you go closer and closer to the hardware. Long story short, go for it and learn C++.

C++ isn't necessarily more efficient--it's just more manageable for larger projects to go the Object-Oriented route.

Java is a serious language and very much so. It is thoroughly used and many careers require Java experience. You should eventually learn Java even if on a superficial level.
owemeacent wrote:
What about libraries? Which one has more?
Either? I can't see how this is a relevant question. There's countless libraries for both.

owemeacent wrote:
Is it better than c++?
There's no such thing as "better." There's only the preferred and the more suitable. I prefer C++, and will use it for the majority of anything I ever code. However, there are some things that I would so much rather do in Haskell.
But Java isn't nowhere as low level as C or C++ or even lua because it uses a virtual machine to run on all of them
owemeacent wrote:
But Java isn't nowhere as low level as C or C++
Like I said, there's only the preferred and the more suitable.
Are there any languages that are as good or better than c or c++ that are Linux oriented
As has been said, "good" or "better" is all subjective. In my recommendation, it is simply good to have a variety of languages, so that if you want to do something you have the ability to select the best option.

I would suggest learning some kind of high-level scripting language to do things easily and quickly, such as Python. I often use python for just little things that I require to be done but would just take too long in a low level language like C++.
owemeacent wrote:
Are there any languages that are as good or better than c or c++ that are Linux oriented
You're not getting my point. That question isn't relevant, nor can it be answered in any reasonable way because there isn't an answer. C++ isn't "better" than Python, even though I dislike Python. You can accomplish a lot of the same things in every language, it's just a different route to get to the same place. So what I think is better in my opinion holds absolutely no meaning.
C, C++, Java, Python, they are all about as good as languages get and each has their purpose. You won't find better languages than these, but you may well find worse ones.

As for D vs C++. It would seem more sensible to use C++ since it is so much more popular? It opens up more opportunity for help, for libraries and for jobs.
Topic archived. No new replies allowed.