Re: This may be a bit of a twisted idea...
Re: This may be a bit of a twisted idea...
- Subject: Re: This may be a bit of a twisted idea...
- From: Brian Hill <email@hidden>
- Date: Mon, 2 Jul 2001 20:03:30 -0500
On Monday, July 2, 2001, at 02:54 AM, John C. Randolph wrote:
So, I'm poking around in NSMethodSignature, NSInvocation, and
other arcane stuff in the Foundation kit and it occurs to me that
interpreting Obj-C method calls (a'la' Perl's "eval" operator) is
quite feasible. What I have in mind doesn't achieve the full
power of the C language, but if I were to take a page from
SmallTalk and implement -ifTrue:, -ifFalse: and loops that use
NSEnumerators, then I've got Turing-complete scripting in Obj-C,
don't I?
Comments?
-jcr
[Objc retain];
Look at FScript (www.fscript.org). It's an open-source Cocoa
scripting language with SmallTalk syntax. There is a fairly
transparent bridge to ObjC/Cocoa via the methods you're hinting at
(NSMethodSignature and NSInvocation). It's also got some pretty
nifty array operators. I'd highly recommend it.
Brian
email@hidden
http://personalpages.tds.net/~brian_hill
"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman