F-Script 2.0 beta 1 is out (download here). Here is what’s new since the latest alpha:
Handy syntax for specifying dictionaries
Looks like this (for a dictionary with two entries):
#{key1 -> value1, key2 -> value2}
This creates an NSMutableDictionary object.
Easy access to standard IO streams
Three globals, stdin, stdout and stderr give access to the standard IO streams. You can invoke the print: method on stdout or stderr, passing a string to output. For example:
stdout print:'hello world'
You should use this instead of the old sys log:'hello world', as the sys object is not available when developing F-Script classes.
Switching between automatic GC and reference counting
You can now choose to run F-Script.app either with automatic Objective-C garbage collection or in reference counting mode, thanks to a new option in the preference panel. Personally, I use to run with automatic garbage collection whenever I can and switch to reference counting mode when I need to load frameworks or bundles that do not support automatic garbage collection.
F-Script Anywhere
A developer preview version of F-Script Anywhere 2.0 is included in the distribution!
Updated documentation
In particular, a new tutorial, Creating Cocoa classes with F-Script, provides a quick introduction to this new feature of F-Script 2.0.
Enjoy!
Came over from the Ars Technica article.
Is there some sort of rationale behind using a different syntax than Objective-C? Seems counter productive in many, many ways.
For instance, me interest sank to almost zero upon discovering it.
Philippe, Congrats on 2.0 Beta 1!
I’m very happy with the classes and the new dictionary syntax. Great stuff. Hopefully I’ll get some time this year to contribute.
F-Script is a SmallTalk dialect … that’s the reason for the different syntax.
That said, the syntax is not so much different from ObjC that you couldn’t grasp it without investing 5 minutes of your time.