• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Tid's 'n AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Tid's 'n AS
      • From: bill fancher <email@hidden>
References: 
 >Tid's 'n AS (From: bill fancher <email@hidden>)

  • Prev by Date: Re: Applescript in a Nutshell
  • Next by Date: How to "wake up" from sleep in Apple script ?
  • Previous by thread: Re: Tid's 'n AS
  • Next by thread: Re: Tid's 'n AS
  • Index(es):
    • Date
    • Thread