[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Interfacing to AppleEvents



I hope I'm not flying off on a tangent here, but ever since I heard Apple
was going to include AppleScript on Rhapsody, I've been grumbling.

I think AppleScript is a poorly conceived and poorly implemented
language. I have a few examples in support of my argument, but at
a gut level, I like languages that behave the way I intuitively
think they should and I dislike languages that are always catching
me on their rough edges. AppleScript is full of gotchas.

(e.g.,
    set myRecord to {aname:"bob", street:"12 green st"}
    -- this works
    display dialog ("Key:  aname" & "->" & aname of myRecord)
    display dialog ("Key: street" & "->" & street of myRecord)
    -- this doesn't work
    repeat with mykey in {"aname", "street"}
        display dialog ("Key: " & mykey & "->" & mykey of myRecord)
    end repeat

In Perl, it works:
   %myRecord = ( "aname", "bob", "street", "12 green st" );
   foreach $mykey (keys %myRecord) {
      print "Key: " , $mykey , "->" , $myRecord{$mykey}, "\n";
   }
)


To return to the subject, I think Apple should support the
*functionality* of Apple Events on Rhapsody, but should kill
AppleScript. By functionality, I mean a well-documented
mechanism for communicating among scripts and applications.
This can be used for remote control, enhancements, added
functionality, etc.  This mechanism should be machine
independent and network capable.

I would rather see Apple roll AppleEvents into a standards
based initiative like CORBA, than to see Apple continue down
a road that no one else will travel.

(To preserve people's investment in AppleScript,
Apple should come up with a script converter.)

Every time I think about this, I start wondering whether
CORBA can bring sense to the whole thing. My company is trying
to figure out how to do cross-platform scripting and we
haven't found any good answers.

Down the road, Frontier may be a solution -- if it gains
momentum on PCs. Perl lacks the inter-application
mechanism on the PC side. Sun would like to see TCL
get embedded, but it's coming out of left field  for
most application developers on PC and Mac.

But if we get used to CORBA wrappers, then we can use Apple
events on the Mac, OLE on the PC, etc., and not get locked
into something that will break all of our scripts when the
mechanism changes or disappears -- or something better comes
along.

What would it take to make Perl scripts into CORBA objects?

*** stuff deleted ***

>
>I never *reprimand* participants in such discussions, I merely *remind* them
>of
>the purpose of the list (or my interpretation thereof) :-).
>
>As for the present discussion, it is valuable to me in shaping ideas about
>improving AppleEvent support, which ultimately might be the core competency of
>MacPerl to migrate into a yellow box rhapsody perl. Thus, I think the
>discussion still has some usefulness left in it if participants are willing to
>keep some discipline.
>
>Matthias
>
>-----
>Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
> "This comment reminds me of the APL93 meeting where people declared APL to
>  be a thriving, growing language. It's like going to a wake where only the
>  next-of-kin don't seem to be aware that the guest of honor is actually
>  dead."  -- Richard J. Gaylord <gaylord-100993020849@mm-mac18.mse.uiuc.edu>
>
>
>
>
>
>
>
>
>
>***** Want to unsubscribe from this list?
>***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch


--
Ken Kress * Managing Editor Inc. * kkress@maned.com * http://www.maned.com



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch