F-Script is an open-source scripting and interactive environment for Cocoa, the Mac OS X object system. It lets you easily play with the rich set of object-oriented frameworks provided by Apple and the Cocoa community. This new article, Learn F-Script in 20 Minutes, will teach you the basics of F-Script and show you how to use it to experiment with the advanced graphics capabilities of the Mac OS X Core Image framework. If you aren’t using F-Script yet, this is your chance to learn how it can improve your productivity as well as those of the users of your own applications.
I’m not into obj-c or f-script at all, but looking the code comparaison. It make me wonder what’s the different or what’s the advantage. If it’s just the compile time and the possibility to embedded it, why change all the closure, if statement, etc..
Can we accomplish the same thing with pyObjc?
Yes, pyObjc can do similar things, but F-Script is specifically geared towards Obj-C programmers, whereas Python is a programming language for all.
F-script reduces a lot of the Obj-C syntax.
Consider this in Obj-C:
[NSMutableArray arrayWithObjects:@”Hi”, @”mom”, nil]
But in F-Script:
{‘Hi’, ‘mom’}
So one takes a hit in performance for simplicity in syntax?
I can see where rapid prototyping an application would leverage FScript and I have it myself.
However, I’d quickly move to straight ObjC/C when writing my application for end user consumption.
Well, F-Script is a Smalltalk variant that has direct ties to the Cocoa frameworks, but one need not know Objective-C first. As such, the programming idioms in F-Script are completely different than those for Obj-C. (Similarities exist because Smalltalk influenced Objective-C’s design.)
F-Script is geared toward Smalltalk programmers, just as PyObjC is geared toward Python users. Interestingly enough, Ruby coders will quickly feel at home using F-Script.