discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Other Langs


From: Pascal J . Bourguignon
Subject: Other Langs
Date: Mon, 4 Oct 2004 20:40:37 +0200

Arich Chanachai writes:
> How hard is it to implement other languages for GNUStep?

How hard is it to implement a GNUstep binding for the language X?

It depends on the language.

Objective-C is dynamic, all the classes and methods, etc, are
introspectable at run time.  So with a dynamic language such as
Smalltalk or Lisp, is rather easy.  With static languages, you can
quite easily interface with the C API of the Objective-C runtime, but
it's less well integrated.  Then you have to generate automatically
functions or methods or whatever you have in your language to
encapsulate messages sent to Objective-C thru the C API.

Remains the constants and typedefs. You'd need to process header files.

There can be some difficulties with memory management and threads.
For example, Smalltalk and Lisp have garbage collectors while Openstep
uses reference counting.

Also, if you have an OO language, you may want to subclass in that
language Objective-C classes, and this is not so simple as one might
think, because there are subtle but important difference in the
classes and objects mechanisms in the various OO languages.

You may have a look at openmcl (http://openmcl.clozure.com) for an
example of a Common-Lisp binding.

The GNUstep project contains bindings for a Smalltalk and Scheme.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

To vote Democrat or Republican, it's like changing of cabin in the Titanic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]