Two argument open() is badly designed because the second argument actually represents two vastly different types of data (MODE and FILENAME). Getting these two pieces of data from your head to the CPU involves gluing them together and then parsing them apart again. This co-mingled intermediate form is what tilly, Dominus, and Dan Bernstein are warning against.
In the uptime case, the intermediate form is the english representation of a span of time. If you want your computer to tell you how many seconds its been up, asking it to stringify that information into an english phrase for you to reparse seems like the wrong path to me.
Given the number of Updates: in this thread, parsing the english is actually somewhat tricky. Why go to all that trouble if your machine can just hand you the exact piece of data you're interested in?
-Blake
In reply to Re5: Parsing 'uptime' output
by blakem
in thread Parsing 'uptime' output
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |