Re: Tid's 'n AS
Re: Tid's 'n AS
- Subject: Re: Tid's 'n AS
- From: Michael Terry <email@hidden>
- Date: Thu, 07 Nov 2002 02:10:03 -0800
On 11/5/02 1:13 PM, "bill fancher" <email@hidden> wrote:
>
There IS no default value for tid's. That would be the case if you
>
could say:
>
>
set abc to text items of "abc" with text item delimiters x
>
>
and if the statement
>
>
set abc to text items of "abc"
>
>
were equivalent to
>
>
set abc to text items of "abc" with text item delimiters ""
>
>
There's an INITIAL value given to tid's by AS. There's a CURRENT value
>
for tid's. But there's no default. Assuming that the current value is
>
the initial value (or anything else) or that there's a default is where
>
the problem lies.
An environment setting an initial value is the very definition of 'default'.
The method or persistence of the setting doesn't make any difference.
>
On Wednesday, November 6, 2002, at 06:39 AM, Michael Sullivan wrote:
>
>
> Another fundamental tenet of defensive programming is to assume your
>
> users (including programmers who use your functions) could make any
>
> *reasonable* assumption, even though they shouldn't, and make it work
>
> they way they would expect unless there is a non-trivial cost to doing
>
> so.
>
>
Assuming some value for tid's (e.g. "") is NOT reasonable.
Yes it is, otherwise most people wouldn't do it. People aren't dumb.
>
The only "side" whose code will break is the one that uses tid's
>
without setting them. Doing that is a BUG in your code.
Oh, really? Why does AS give a default value to TIDs, then?
Mike
_______________________________________________
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.
References: | |
| >Tid's 'n AS (From: bill fancher <email@hidden>) |