argument parsing in c++ and python

Argument parsin in python seems to add  a level of complexity compared to that of c++.  In  c++, one only needs to define the argument vector and the arguments are already stored in the vector.  They can be easily accessed without some sort of extra STL library.  On the other hand, python requires the use of the argparse module which is interesting.  One would assume that it would be like c++ and allow for easy access to the given arguments. I think it’s safe to assume that argument parsing is used widely enough to justify auto inclusion of the argparse module.

Then again, it does allow you to be completely customizable with the python program.  I guess that if you’re not going to be parsing arguments, having the argparse module would be pointless and possibly slow down the program.  I guess this fits in more with the Unix design philosophy.

Leave a Reply