4 ms·
The problem with the IPC approach isn't error handling - in the error case a good string is usually fine. The problem is with parsing the output of the sub proc
by _ph_ 3y ago
The problem with the IPC approach isn't error handling - in the error case a good string is usually fine. The problem is with parsing the output of the sub process. A library can return structured data. Parsing always has the risk of format change or quickly gets very heavyweight. Both in the syntax of the output and the parsing routines. It is another good example of the SVN system, that their commands usually have the "xml" option which creates structured output in xml format. So you can use standard parsers to get robust output.
This is also one thing I like about powershell, that commands can produce and pass objects instead of just writing to stdout.