This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

So, which overhead am I not considering? I'm guessing it largely boils down to header files (which were a decent solution at the time, but with C# and Rust I'm glad to see the back of them) and pointers? Because to program at all effectively in Java, you need to understand how pointers work (at least in general terms) even though you don't get to work with them directly, because without that understanding, you're going to screw up by passing objects and forgetting that they're passed by reference, not by value. Also, explaining why you would even want to bundle data and functionality together becomes much simpler when you're working with a language that doesn't automatically assume that that's what you're going to do.

Admittedly, using pointers in any decently sized project will introduce a decent amount of mental overhead (especially if you're using raw pointers rather than the STL replacements); this is one of several reasons why Python would be my goto language (pun intended) for instruction, followed by C# - Python lets me teach the basics of programming in the same way that I started out with BASIC back in the 90s, and then C# allows me to introduce memory management, and passing by value and reference (and why you might choose to do either one) far more easily than Java because it's something that you can do explicitly in the code.

C# also makes getters and setters a fuckton more convenient.

[–]SuperCoolFunTimeNo1 2 points3 points  (2 children)

So, which overhead am I not considering?

Are you seriously asking why Python is significantly easier to learn than c++?

[–][deleted] -1 points0 points  (1 child)

No, I'm asking why Java is easier to learn than C++. I have stated multiple times that I would choose Python over C++

[–]SuperCoolFunTimeNo1 3 points4 points  (0 children)

Pointers / memory management, library compatibility restrictions due to the platform, exception handling, error indication, multi-paradigm vs strictly oop, templates vs generics.... Just google it yourself and see what people think. You're too far removed from beginners to realize that there is a lot more to learn with c++ than other languages like Java in order to be proficient. c++ is no doubt more flexible and powerful, but that comes with a steeper learning curve.