[Openmcl-devel] default directory
R. Matthew Emerson
rme at clozure.com
Mon May 4 04:19:01 EDT 2009
On May 3, 2009, at 4:39 PM, Joakim Sandgren wrote:
> it seems to me that easygui is a package that is made a little ad
> hoc, "for now", to resolve urgent needs now. and the gui package is
> part of the "real" cocoa communication in clozure ccl...
> and perhaps in a future better version the easygui will be obsolete
> but the gui package not...
> I am of course still waiting for some window functions in ccl, and
> for the moment being I dont know on wich horse I should bet...
At the moment, I find that I am more-or-less writing Objective-C code
in Lisp. That is to say, I'm just using the Objective-C bridge
directly. On the one hand, this is not so bad: it's certainly handy
to be able to add and redefine Objective-C methods on-the-fly, and so
forth. In some ways, it even feels pretty high-level. After a while
you become desensitized to the #/callSomeMethod syntax and forget
that you're calling foreign code (at least until you screw up and
crash the lisp).
On the other hand, you really need to know Cocoa pretty well in order
to work like this. You have to understand various Cocoa conventions
like naming, memory management, the model-view-controller pattern
(ugh, I said "pattern"), threading issues, etc.
I think we do need some sort of CLOS-y interface to Cocoa that
abstracts out the need to worry about running stuff on the proper
thread, takes care of appropriately retaining and releasing Objective-
C objects, does something about the lisp string to NSString hassle,
and so on.
Easy GUI is an experiment in that direction. I am not using Easy GUI
when developing code for the IDE, but I do hope that as we all get
more experience programming Cocoa in CCL, we'll be able to identify
and implement good abstractions for various aspects of Cocoa and put
that code somewhere, whether that be Easy GUI or somewhere else.
More information about the Openmcl-devel