Not a convincing argument (1) most of the scripting languages ar dynamic, (2) that code would be 3 lines of python, (3) since when does C++ have a large standard library?
Bjarne was just was just saying it doesn't as they don't have a curator for it. Plus there are so many gaps in the standard library. Where are the GUI tools, the unicode support?
Don't get me wrong: C++ is an amazing language but it is not, nor was it designed to be, nor will it ever be, a Python. It's very very good at what it does but whatever that is, isn't scripting.
Except for any sort of quality of code, you should really be checking int argc, and making sure that ifile & ofile are valid files. And suddenly it's doesn't look so script like.
And that's before I deduct points for using namespace.
Yeah, I know. I was just trying to keep it comparable to his style (including the pointless return 0). To be fair though you need to check arguments in Python as well.
Of course. The small problem is that it's just another line of boilerplate which is somewhat inconvenient for very small programs. the bigger problem is that most libraries want work well with this one, since it is not there by default.
This is never going to run, unfortunately, because this would require memory allocation (one for the vector and one for each string). It's been proposed and rejected already.
The advantage of std::initializer_list and std::string_ref is that neither require an additional memory allocation. And if it just [] or at() missing, it should be easily implemented.
32
u/[deleted] Oct 15 '13
Not a convincing argument (1) most of the scripting languages ar dynamic, (2) that code would be 3 lines of python, (3) since when does C++ have a large standard library?
Bjarne was just was just saying it doesn't as they don't have a curator for it. Plus there are so many gaps in the standard library. Where are the GUI tools, the unicode support?
Don't get me wrong: C++ is an amazing language but it is not, nor was it designed to be, nor will it ever be, a Python. It's very very good at what it does but whatever that is, isn't scripting.