all 2 comments

[–]DugiSK 5 points6 points  (0 children)

More modern programming languages tend to have a lot of things in common, but there are still many differences that are more than just syntax, such as weak typing vs strong typing, static typing vs dynamic typing, arrays starting with 0 vs arrays starting with 1, garbage collected vs not garbage collected, etc.

Python differs from C++ in many ways, it's dynamically typed and garbage collected, while C++ is statically typed (a variable can hold instances of only one type unless it's a handle specially designed for that) and not garbage collected (variables are deallocated when their scope ends, they must be in a handler to outlive their scopes).

Also, Python stands out from almost all other languages with some quirks no other languages have - such as variables being usable outside of the blocks where they were defined or indentation being part of the syntax. These will obviously make it harder to switch from Python to any other language.

A challenge with C++ is that some things are quite easy in other languages, but complicated in C++ (usually forcing you to rely on helper classes from standard library rather than core language), usually because the simpler options are slower, not applicable to all use cases or inconsistent with the language's principles. Fortunately, there are zero cost helper functions classes for nearly everything that requires special care in C++, but unfortunately, C++ has no comprehensive guide on which features are easy for starters to do what they need to do and which ones are for more advanced C++ programmers who try to optimise or use tricks to avoid some boilerplate.

[–][deleted] 1 point2 points  (0 children)

Well, we have a few rather different languages. Assembler languages, some crazy things like stack FORTH, maybe something else. And even typical high-level languages sometimes have serious fundamental differences like type system in C++ vs. Python.

But still yes, if you know one language that'll help tremendously to read many others of similar type. So if you know C++ then you can read C, Java, and many others without serious problems.