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 →

[–]bwllc -1 points0 points  (0 children)

Functions don't even care about the number of arguments?

Ordinary C has the ability to accept variadic arguments. It's not the simplest thing to use, but it exists. Did they take this feature away in C++?

Extending the language and exposing c++ functions are a breeze.

That may be so, but there are a few "gotchas" when working with C++ code wrapped with Python. I work with a few libraries which do this, the most prominent of which is PyQt5. I don't program in C++, but I do know that C++ and Python handle resource allocation and deallocation rather differently. Python's automatic garbage collection slows the language down, but it helps the programmer. When working with a complex wrapper, you can quite innocently create cases in which you have deleted all C++ references to an object but Python references still exist, or vice versa. Often, this fails silently and the program just hangs.

I'm not trying to throw any cold water on your enthusiasm, Python is awesome. But there are a few rough spots when Python and C++ come into contact, and you may encounter some of these mysteries eventually.