• 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: terminology conflicts, etc. [was: Re: A date IS a date]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: terminology conflicts, etc. [was: Re: A date IS a date]


  • Subject: Re: terminology conflicts, etc. [was: Re: A date IS a date]
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 10 Feb 2008 14:07:20 -0600

On Feb 10, 2008, at 12:30 PM, Ed Stockly wrote:

>>Mark>>Given that the correct choice of attribute or whatever can't be made until runtime, it seems like the design flaw lies in allowing the same English word to compile to different things in different contexts.

>>Has>>>Yes. Exactly.


You say design flaw, I say design feature. Before appleScript applications with their own scripting languages had commands like this:

printPage
printDocument
printRange
printSelection

Each of those were verbs and the application vocabularies or dictionaries were huge.

AppleScript is designed so the scripter types "print" as a verb and page or document, etc. as a noun. Suddenly the same English word can be used to act on multiple objects.

Not just that, but the same command "print document" for example can be compiled and executed in hundreds of applications. Similarly, you don't need to learn how each different application refers to a character or a pixel or print setup or whatever. You can use the same keyword in each context.

This is the same english word, compiling to different things in different contexts and one of the things that makes AppleScript AppleScript. This feature can be complicated by terminology conflicts, when an installed OSAX has the same keyword as an application. But, again those are very rare and easy to diagnose and workaround.

Some of you may be under the illusion that commands should be designed so that context isn't a problem. Unfortunately, it not something you can get rid of even if you wanted to. Let me tell you a story that does not even involve computer languages.


I sometimes teach math courses at the nearby community college. This past fall, I taught a course that involved calculation of per cent. So, what does the word "%" mean?

In the language of mathematics, we define:
	% = 1/100
Nothing else. That's all you need to know about per cent.

In a natural language, consider the two phrases:
	A	"... the number of things increased by 6 ..."
and
	B	"... the number of things increased by 600% ..."

Read them carefully and decide what they mean. If you look at the sentences as a whole, without picking at their parts, they can be translated into mathematics as:
A (number of things) + 6
and
B (number of things)•6
One of them tells you to multiply and the other tells you to add.


If we pick at their parts, however, the two phrases mean exactly the same thing, because 6 = 600%.

How do we avoid confusion? You can't use the rules of mathematics on the phrases before they are translated. It's the wrong context. The rules of the language mathematics don't apply to natural language. In natural language "%" is an instruction telling you to multiply. In mathematics its just a number. Translate into mathematics FIRST ... changing context to the rules and grammar of mathematics.

_______________________________________________
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: terminology conflicts, etc. [was: Re: A date IS a date]
      • From: Luther Fuller <email@hidden>
References: 
 >Re: A date IS a date (From: Ed Stockly <email@hidden>)
 >Re: A date IS a date (From: "Mark J. Reed" <email@hidden>)
 >Re: terminology conflicts, etc. [was: Re: A date IS a date] (From: has <email@hidden>)
 >Re: terminology conflicts, etc. [was: Re: A date IS a date] (From: Ed Stockly <email@hidden>)

  • Prev by Date: Re: Error -609
  • Next by Date: Re: do shell script vs. do script with command
  • Previous by thread: Re: terminology conflicts, etc. [was: Re: A date IS a date]
  • Next by thread: Re: terminology conflicts, etc. [was: Re: A date IS a date]
  • Index(es):
    • Date
    • Thread