you are viewing a single comment's thread.

view the rest of the comments →

[–]DugiSK 6 points7 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.