Comment Comment by brian_cloutier > Ignoring include boilerplate and the like leaves us with roughly ten lines of code.I'm not sure you get to claim a language is a scripting language and then ignore the boilerplate.The equivalent python is 4 lines, just one more than the number of steps you're performing. import sys data = open(sys.argv[1]).readlines() lines = sorted(data) open(sys.argv[2], 'w').writelines(lines) C++ is good at many things, but quickly creating readable scripts and live-coding with a REPL are not among them. parent brian_cloutier 13 years ago
I'm not sure you get to claim a language is a scripting language and then ignore the boilerplate.
The equivalent python is 4 lines, just one more than the number of steps you're performing.
C++ is good at many things, but quickly creating readable scripts and live-coding with a REPL are not among them.