Re: Removing characters from a string
Re: Removing characters from a string
- Subject: Re: Removing characters from a string
- From: John Delacour <email@hidden>
- Date: Tue, 5 Nov 2002 19:11:05 +0000
- Mac-eudora-version: 5.3a8
At 11:05 am -0500 5/11/02, Daniel A. Shockley wrote:
John, there's nothing new about the idea that a function should
never have unnecessary side-effects. That's been a fundamental rule
of good programming for decades.
... and goes without saying
Ridicule of good programming habits doesn't help anyone.
I was ridiculing BAD and thoughtless programming habits, which I've
seen land many users of this list in trouble over a long period.
If I write a handler called simpleReplace that takes three
parameters: source text, what-to-find, and what-to-replace-with,
that handler darn well better put back the text item delimiters to
what they were, not what the default is. Does the name
"simpleReplace" imply to anyone reasonable that "Oh, I'm going to
change the TIDs, too - good luck, sucker!"
Handlers are a special case where you obviously need to exit with the
same tids as were in operation when you called the handler.
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.