• 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: does property exists in a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: does property exists in a record


  • Subject: Re: does property exists in a record
  • From: Timothy Bates <email@hidden>
  • Date: Tue, 14 Aug 2001 11:50:26 +1000

On 13/8/01 11:51 PM, "email@hidden" <email@hidden> wrote:
> Associative data structures ... would allow a filter reference form:
> get every item of myStruct where its a is "Bob"

Definitely: whose clauses everywhere, including lists.

> Any data type could be the 'index' rather than just a string
This would make AppleScript's Arrays more powerful, but may be rather slow.
I would have to think about this one. It sounds good at first blush, and may
well be a real insight. I have become amoured with the Unix model of
treating everything as a string (file = string, directory=string,
command=string, ...), but with AppleScript's ability to coerce values, your
idea may be a good one.

> [Let's have]
> every item of myStruct where its name contains "Bob" and it age > 42

Well, while this is no longer an associative array (you are now looking at
records), I agree that records should support clauses also.

Not to do so was an oversight in the initial design of AppleScript, which,
apart from text, left clause support up to the app (where AppleScript's
designers thought all the work was going to be done anyhow - not realising
how powerful AS was in its own right. I recall reading in the "HyperTalk
2.0: The Book" how few people at Apple believed that maybe a few hundred
script professionals would ever write a HyperCard script - then they were
blown away when academics and artisans around the world started writing
scripts by the 10s of thousands!

tim


References: 
 >Re: does property exists in a record (From: email@hidden)

  • Prev by Date: Re: Hash arrays [was: does property exists in a record]
  • Next by Date: Speech Recognition (Stock price project)
  • Previous by thread: Re: does property exists in a record
  • Next by thread: Script losing their paths to Standard Additions
  • Index(es):
    • Date
    • Thread