Re: Parents/Child Scripts
Re: Parents/Child Scripts
- Subject: Re: Parents/Child Scripts
- From: email@hidden (Michael Sullivan)
- Date: Mon, 13 May 2002 01:33:33 -0400
- Organization: Society for the Incurably Pompous
Paul Berkowitz writes: (about has and his explanations of Applescript
OO):
>
I read it, and it's extremely useful and clear. It makes me wonder why I
>
haven't been using such techniques since I've been doing a ton of pasting
>
and consequent debugging recently with a very large set of scripts which
>
share many routines. I guess it's because I thought this inheritance stuff
>
was too complicated to get into and didn't apply to the sort of things I've
>
been doing, but it does. Your explanation makes it very easy to understand.
>
Keep it up and, yes, you should write a book. Release it in such a way that
>
it's not too expensive for you since I don't know how large a market there
>
would ever be for Advanced AppleScript Concepts and Techniques (unless you
>
could get a major publisher interested, of course.) Thanks for your efforts.
>
I know it's not always easy to keep plugging way when you don't get much
>
response. As far as I'm concerned, you're more than welcome to to keep
>
sending early "drafts" to the list. I'm sure that any ongoing feedback you
>
get would be useful for all concerned.
I agree here.
The only issue I have with a lot of this stuff is that Applescript gets
kind of flaky when you make big script objects. I've done some stuff
where I end up with stack overflows trying to save my script, or storing
a script in a file when I'm done with it.
If your script objects do methods where they are passed big data
structures and never store them from call to call, they are probably
fine, but I'm a little concerned about the ability to do the classic
application of OO which is to encapsulate a data structure in a script
object so that it's implementation is hidden from the client.
I suspect this will only work well, when the script reads and saves it's
data structures on disk, which may be a problem for speed. It also
makes for a lot of hairy pointer coding that fails to take advantage of
AS's predefined data structures.
All in all, I'd be a lot happier if there was a set of memory management
calls that one could make in defining script objects that would tell
applescript to set aside extra stack room, or whatever to keep from
having the kinds of problems I'm experiencing.
For right now, complicated structures can be fun to build in AS as a
prototype or just to see what the language is capable of. But
implementation for any large scale real world purposes is probably best
left to other languages where it's possible to be more robust.
Michael
_______________________________________________
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.