Re: Questions about launchd
Re: Questions about launchd
- Subject: Re: Questions about launchd
- From: "Jordan K. Hubbard" <email@hidden>
- Date: Sat, 25 Aug 2007 11:51:26 -0700
On Aug 25, 2007, at 11:41 AM, Finlay Dobbie wrote:
Yes, but we were discussing the fragility of parsing tool output.
OK, well, that's an easy discussion: Don't do that.
If that's too terse of an answer, here's a little example Q&A session
that elaborates:
Q) What if I really want to parse command line output?
A) I don't care. Don't do that.
Q) But... Parsing command output is easier than writing C code which
does the same thing through API calls! What do you say to that?
A) Don't do that.
Q) Isn't there some sort of tacit agreement to keep command-line
output formats the same forever, as God and Dennis Ritchie intended?
A) No. Don't do that.
Q) What if I'm one of those scripting types who believes that
compilers are an abomination? Can I parse command-line output then?
A) No. Don't do that. Use Ruby, Python or Perl and some of the fine
API shims they provide for doing such things.
Q) Aren't you being just a tad inflexible about all of this?
A) Yes, but you still shouldn't do that. We reserve the right to
change command-line output at any time (sometimes it's not even us,
but our upstream OSS providers) and when your scripts break, we'll
both be sad and wishing you'd followed the advice in this Q&A.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden