• 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: a date is not a date? Or: Why I sometimes hate AppleScript...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a date is not a date? Or: Why I sometimes hate AppleScript...


  • Subject: Re: a date is not a date? Or: Why I sometimes hate AppleScript...
  • From: has <email@hidden>
  • Date: Sat, 9 Feb 2008 17:49:21 +0000

On 9 Feb 2008, at 16:29, deivy petrescu wrote:

As people have already pointed out, this is a clash in nomenclatures.
iTunes defines year as a property of audio CD playlist.
[...]
As for you hating AS, this is your call, but mostly I feel that problems arise because of the implementors.

Nope, its AppleScript's fault. Terminology conflicts are an inevitable consequence of its design, and an object lesson in why it's a bad idea to combine arbitrarily extensible grammar with dumb character-based source code.


It's neither reasonable nor realistic to expect application developers to know of, and avoid, every single keyword that might someday be used by some other osax or AppleScript itself, and completely unfair to blame them when such conflicts do occur.

These problems simply don't exist in languages that have a stable, unambiguous grammar, e.g. the following works perfectly in Python with nary a peep about invalid syntax or unknown properties or any of that other cryptic nonsense that AppleScripters have to put up with:

from appscript import *

tracks = app('iTunes').browser_windows.first.selection()

for track in tracks:
	date = track.date_added()
	print type(date)
	print date.year


The only terminology conflicts for which application developers might reasonably take some responsibility are those that occur between keywords in the application's own dictionary - e.g. if a class and a property both have the same name, - although these sorts of limited conflicts are still largely Apple's fault for creating the whole human- readable names versus raw Apple event codes dichotomy in the first place.


has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: a date is not a date? Or: Why I sometimes hate AppleScript...
      • From: Walter Bushell <email@hidden>
    • Re: a date is not a date? Or: Why I sometimes hate AppleScript...
      • From: Christopher Nebel <email@hidden>
    • Re: a date is not a date? Or: Why I sometimes hate AppleScript...
      • From: deivy petrescu <email@hidden>
    • Re: a date is not a date? Or: Why I sometimes hate AppleScript...
      • From: Michelle Steiner <email@hidden>
References: 
 >a date is not a date? Or: Why I sometimes hate AppleScript... (From: Skeeve <email@hidden>)
 >Re: a date is not a date? Or: Why I sometimes hate AppleScript... (From: deivy petrescu <email@hidden>)

  • Prev by Date: Re: PHP and Applescript
  • Next by Date: Re: a date is not a date? Or: Why I sometimes hate AppleScript...
  • Previous by thread: Re: a date is not a date? Or: Why I sometimes hate AppleScript...
  • Next by thread: Re: a date is not a date? Or: Why I sometimes hate AppleScript...
  • Index(es):
    • Date
    • Thread