Re: Recommendations for scripting/extension languages for Cocoa apps
Re: Recommendations for scripting/extension languages for Cocoa apps
- Subject: Re: Recommendations for scripting/extension languages for Cocoa apps
- From: Jason Alexander <email@hidden>
- Date: Mon, 26 May 2003 10:09:06 +0100
I'd like to thank everyone who took the time to respond to my original
question. I received a number of excellent recommendations but am
having some difficulty deciding which language to use. No doubt
because, as Pascal noted:
Without specs from you, all what you will get here is an almost
endless list of all the embeddable languages available on this planet
(JavaScript, AppleScript, F-Script, Ch (and all the C, C++
interpreters available), Perl, Python, Lua, Ruby, Prolog, LISP,
Smalltalk, TCL, sh, bash, tcsh, csh, BASIC, ...
So, here's a quick summary of what, ideally, I'd like to be able to do
with the embedded language:
* Access as much of the native Cocoa classes as possible. (Enabling one
to create
new GUI tools/control panels using the scripting language.)
* Define new subclasses of existing Objective-C classes. These new
subclasses,
even though they are defined in the embedded language, should be
treated
as "first-class" citizens, capable of responding to Objective-C
messages, etc.
* Define new functions or methods which can be used to replace existing
class methods.
* Define new methods which can be added to classes at runtime.
* Add new instance variables to instantiated classes.(1)
In addition, the embedded language should be objected-oriented (if
possible).
The main concern, though, is that the embedded language be FAST. If I
have to rip through a list of 10,000 objects, sending each object
multiple messages, and these 10,000 objects are defined in the embedded
language by subclassing some Objective-C class, I would like there to
be as little difference in speed as possible between doing this and
ripping through a list of 10,000 native Objective-C objects sending
functionally similar messages.
[Regarding (1), AFAIK, this cannot be done with Objective-C. I'm
planning on implementing this by creating my own base Object class
which contains a NSMutableDictionary that can be used to fake adding
new instance variables to the class.]
I think that narrows the playing field somewhat. I've taken a look at
F-Script and RubyCocoa. Python sounds promising, but the web page looks
as though it is still quite under development.
Cheers,
Jason
--
J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.