Re: Variable Ponderance
Re: Variable Ponderance
- Subject: Re: Variable Ponderance
- From: Courtney Schwartz <email@hidden>
- Date: Fri, 1 Oct 2004 16:14:39 -0400
I can understand your distaste for pointers, pass-by-reference and
heaps, but that doesn't mean it's never helpful to understand them when
trying to understand certain puzzling behavior of AppleScript.
AppleScript can be useful to non-programmers up to a point, because
much of the "technicalness" of it is hidden. But it can also be quite a
frustrating brick wall for non-programmers when they run into that one
place they need the knowledge...unless they've been introduced to
certain computer science concepts.
Certain AppleScript behavior really doesn't make sense unless you're
familiar with basis tenets of computer logic like pointers. Just the
other day I had to set up a routine de-referencing an AppleScript
object. I would have had to abandon the whole project if I hadn't
understood that my problem was an issue of pointing a reference to
another reference, instead of passing-by-value.
Frankly, it would have been a lot more simple to guess my problem if
AppleScript *did* have explicit pointers like C. It's comfortable not
to manually deal with pointers on a routine basis, but when they're the
source of your problem, they're that much harder to track down!
Like any other language, there's both benefits and drawbacks to
AppleScript.
My personal opinion? I love that AppleScript has reduced objects,
methods and parameters to the equivalent typical English syntax of
subject-verb-object. I hate the obscure dictionaries and lack of
information on data types that go with it... one of the reasons I
provide kudos to the Adobe documentation team for providing separate
docs on expected child elements and input/output data types for their
methods. Makes debugging much easier!
Now if only I could find a good inheritance tree diagram...
Courtney Schwartz
On Oct 1, 2004, at 2:55 PM, has wrote:
With a high-level language like AppleScript, you really want to avoid
discussing low-level stuff like pointers - what matters is the
high-level concepts that users are directly exposed to, not low-level
implementation details that the language deliberately goes to quite
considerable lengths to hide from them. [1]
[1] It's even less safe to talk in terms of implementation details
(pointers, stacks, heaps, malloc, etc, etc, etc.) when you're not
actually privy to them yourself - which is the case with a
closed-source language like AS. (This is another reason why wandering
C programmers, like missionaries, should always be shot upon first
sight, before all their 'heap allocation' and 'pass by reference'
babblings infects the rest of the population with singularly
pointless, productivity zapping, rampantly idle speculation...;p)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden