C++ standard library is really lacking - good or bad?

You’ve been programming for forever so for that reason Java and C++ might seem extremely similar, because they are. I commonly accidently write code in C++ while doing java or visa versa. Java if learned completely gives you all the knowledge you need to easily learn C++; however, for someone who doesn’t really understand memory and has always just depended on Java’s abstraction on the subject, getting that abstraction removed is a large shock and can force them to learn a lot.

I do agree though that after you learn the basics of C++, then using either C++ or Java just becomes mainly a preference thing. Though sometimes you can always go back to C to learn things you do in Java more thoroughly (like networking for example). Kinda like LWJGL and libGDX just not as different.

IMHO, people who have started in Java (and did not learn it from a CE type of perspective) should some time to learn the basics of C and spend some time to learn the basics of (as Matheus mentioned) lisp.

I agree with pretty much everything people have said in response to my post. But they are only pragmatic issues. Learning one if you know the other will teach you very little new about “programming” or how you think.

WRT: Lisp likes. It’s a very good choice…but only if you go deep, which few people do.

There is one thing I might want to note:

When I first started learning Lisp/Scheme/Scala I pretty much found myself writing Java in another language. That’s also what will happen to you with C++ probably.

Learning another Language is not only learning the syntax. It’s thinking differently.

Yeah, I came from c++ to java and I remember being absolutely frustrated that you couldn’t do pointers, structs, or operator overloading. But it isn’t a bad thing…

Learning C will make your java experience more streamlined and efficient. Java might have a thick verbose shell, but there are ways to drain the speed and flexibility out of java. Regardless, they are both very similar languages. I agree with everything else people here have said already.

My hype and hope for Java is slowly withering away… Hopefully Oracle can pull it back together or I might end up running back to c++.

I do love C++, but it definitely has shown me how lucky I feel to know Java also. With C++ I pretty much have to do everything myself, which is ok, but I like being able to just program in Java and not worry about things that I really don’t need to worry about. Sure, pointers are very useful, but I’ve gone thus far without using them and I think I’ve been doing ok as a developer. I think the attractiveness from C++ comes from the fact that it is very very flexible to work with, and very powerful. As a C++ developer, you give up your safety net but gain power that you could never dream of having in Java!

Yeah, I just made C++ sound like a superhero.

ever since i started scala i havent touched java :stuck_out_tongue:

If you couldn’t manage this:



#include<stdio.h>

int main()
{
    printf("Hello World\n");
    return 0;
}

How on earth did you manage this:



public class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello World");
    }
}

Have you even looked at C? Obviously not, once you get past the basic concepts it’s smooth sailing. I’ve spent a week learning C++ and yeah, I’m by no means even decent with the language, but come on. Stop trying to be the “hip programmer” that spends his time coding in high level languages like Python or Java (not bashing those languages, but they are easy to work with) and hates anything “C” related. Jeez.

I would love to learn a low level language like C or C++ but I dunno, I feel as if I don’t have it in me. With Java a lot of the work is done, being able to whack a quick prototype up in a day is a good feeling, I find it a bit tedious to sit and write an engine. I have tried to make a platformer engine but lacked the knowledge.

I would like to learn C# though but that is a lot higher level than C or C++ to my understanding, almost like Java with some key differences (memory management).

However for me this is the start of my new found love, Java is probably just first of many.

Java is a great first language, but someday you’ll have to learn to use more! I’m not saying you don’t already know other languages (I have no idea if you do or not!) but limiting yourself to only one language when programming is not a good idea. Java can’t be used for everything! Hilariously enough I might actually switch to C++ for game development after I write a small OpenGL utility library for it because it is just that much powerful. The only downside I’ve seen to game dev with C++ is that you have to do a lot of the low level stuff yourself (loading images and sounds etc…), but once you get past all of that, OpenGL is easier (in my opinion) to work with with C++.

I love Java because I develop my Android apps in it though! :wink: And it really is nice to come back to a high level language after a long day of trudging through low level C!

You don’t really have to. C/C++ has more libraries useful for games then you could ever review.

Which is a good thing and a bad thing. Good because you have so much choice. Bad because many of the libraries come with cryptic documentation that is 10 years old and no longer relevant. I’ve found libraries that deal with Java specifically are far better documented, even though there are less for games.

I’m asking myself: Should I concentrate on writing OpenGL ES for Android using Java, or write OpenGL in Visual Studios?

Once you go high, you probably just stay high. Java’s high-level abstraction is what puts me off on C++. Especially the GC part.

I don’t know why you think you can’t do both? I love Java, but I also am starting to like C++. Limiting yourself to one type of language (high level for instance) is a very very bad idea, and definitely will not turn you into a good programmer. Different languages have different uses, Java is good for some stuff, C++ is good for other stuff. Never try to do everything with one language!

And no offense, but if you don’t like C++ because its not high level then I don’t think you’ll have very many opportunities in the future in terms of programming… Many popular languages aren’t high level like Java. I believe many companies still use old languages from before year 2000 because those are the old powerful reliable languages.

This is a very ignorant thing to say. First stop using the term no offense when you’re gonna say something that is condescending and directed at someone else. Second

I don’t see many low level languages on there, do you? Just because someone prefers a high level language doesn’t mean that they wont get a job in CS or SE if that’s what they want to do.

There is lot more to programming software development than knowing many programming languages. It is about algorithms, data structures, system and class design, performance, databases, testing, reliability, maintainable (!) software, taking objective decisions, team work, enduarance, etc. etc.
Those things are important for getting a job.

For the average business developer job you can easily get by without C++ or any low level language. Java, JavaScript, C#, SQL, PHP.

However, if you are masochistic enough and spent those long years that it takes to master C++, you surely have a valuable skill.

Not a single C job out there? I smell bit biased statistic.

Valuable, as in getting paid a lot of money to maintain some 20 year old rubbish code base. So if you are a masochist go for it.

Hold on kids. Java isn’t a very high level language.

I have to disagree. Java is one of the highest level languages I’ve used so far. I’m of course not including languages such as VB because hah… yeah. Java is pretty damn high level.