Miscellaneous fixes, especially to ObjC runtime description.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1143 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-03-13 02:44:00 +00:00
parent d3ad8fce3b
commit 21484aa377

View file

@ -1,6 +1,6 @@
@chapter GNUstep Frequently Asked Questions with Answers @chapter GNUstep Frequently Asked Questions with Answers
Last updated 3 March 1996. Last updated 11 March 1996.
Maintained by Andrew McCallum <mccallum@@gnu.ai.mit.edu>, with Maintained by Andrew McCallum <mccallum@@gnu.ai.mit.edu>, with
contributions by Pascal Forget <pascal@@wsc.com>, Scott Christley contributions by Pascal Forget <pascal@@wsc.com>, Scott Christley
<scottc@@net-community.com>, and Randy Chapman <chapman@@u.washington.edu>. <scottc@@net-community.com>, and Randy Chapman <chapman@@u.washington.edu>.
@ -29,27 +29,26 @@ The GNUstep project consists of the following sub-projects:
@itemize @bullet @itemize @bullet
@item GNU Compiler and Objective-C Runtime Library - though not part of @item GNU Objective C Compiler and Objective C Runtime Library -
the GNUstep project per se, the GNU Compiler is used to compile Although not actually a sub-project the GNUstep, GCC and the GNU
Objective-C code and the Library is a fundamental part of any GNUstep Objective C Runtime Library are integral to GNUstep, since they are used
application. Of particular interest to the GNUstep project is its to make every GNU Objective C program.
efficient thread-safe capability.
@item GNUstep Base Library - code for non-graphical objects, such as @item GNUstep Base Library - Code for non-graphical objects, such as
strings, collections, archiving support and distributed objects strings, collections, archiving support and distributed objects
messaging. (Including functionality similar to OpenStep's messaging. (Including functionality similar to OpenStep's
@samp{FoundationKit}.) @samp{FoundationKit}.)
@item GNUstep GUI Library - code for graphical objects used in making a @item GNUstep GUI Library - Code for graphical objects used in making a
Graphical User Interface (GUI). This includes buttons, sliders, text Graphical User Interface (GUI). This includes buttons, sliders, text
fields, windows, menus, etc. (Including functionality similar to fields, windows, menus, etc. (Including functionality similar to
OpenStep's @samp{AppKit}.) OpenStep's @samp{AppKit}.)
@item GNUstep DisplayGhostScript Server - a server that draws PostScript @item GNUstep DisplayGhostScript Server - A server that draws PostScript
graphics to the screen, and receives events from the keyboard and graphics to the screen, and receives events from the keyboard and
mouse. It is based on GhostScript. mouse. It is based on GhostScript.
@item GNUstep Interface Modeller Application - an application for @item GNUstep Interface Modeller Application - An application for
graphically assembling application interfaces. graphically assembling application interfaces.
@end itemize @end itemize
@ -68,16 +67,14 @@ the FAQ maintainer.
The initial target platforms for GNUstep are Linux and other UN*X's. The initial target platforms for GNUstep are Linux and other UN*X's.
There has been some OS/2 WARP work, but I have not seen any ongoing work There has been some OS/2 WARP work, but I have not seen any ongoing work
on this platform. on this platform yet, (contact McCallum if you are interested).
@item What is the OpenStep standard? @item What is the OpenStep standard?
OpenStep is an Application Programming Interface (API) for creating OpenStep is an Application Programming Interface (API) for creating
applications using the Objective C language. It was published by NeXT applications using the Objective C language. It was published by NeXT
Computer Inc. in 1994. It is being used by Sun Microsystems as part of Computer Inc. in 1994.
their Common Desktop Environment (CDE), and it is being used by Ohio Carbon
Blank as part of their On-line Virtual Community Project.
OpenStep consists of three parts: the @samp{FoundationKit}, a library of OpenStep consists of three parts: the @samp{FoundationKit}, a library of
non-graphical objects; the @samp{AppKit}, a library of objects usful in non-graphical objects; the @samp{AppKit}, a library of objects usful in
@ -209,7 +206,7 @@ can be found below.
With free software, you should never, ever, believe promises about when With free software, you should never, ever, believe promises about when
a project will be finished. ...However, that said: there are certain a project will be finished. ...However, that said: there are certain
GNUstep developers that are counting on having useful Base and GUI GNUstep developers that are counting on having useful Base and GUI
libraries working by Summer 1996. libraries working by the end of Summer 1996.
@item How can I help? @item How can I help?
@ -224,50 +221,87 @@ Andrew McCallum <mccallum@@gnu.ai.mit.edu>.
More detailed inforation about each of the GNUstep sub-projects can be More detailed inforation about each of the GNUstep sub-projects can be
found below. found below.
@section GNU Compiler and Objective-C Runtime Library @section GNU Objective C Compiler and Objective C Runtime Library
@enumerate @enumerate
@item What is the Objective-C Runtime Library? @item What is the Objective C Runtime Library?
The Objective-C Runtime Library is a library of C functions and data The Objective C Runtime Library provides C functions and data structures
structures required to execute an Objective-C program. There has been required to execute an Objective C program. An introduction to the
much written about the special capabilities of Objective-C; we refer you Objective C Language is provided at
to these resources to learn more about the language: @samp{http://www.next.com/Pubs/Documents/OPENSTEP/ObjectiveC/
objctoc.htm}. The Frequently Asked Questions list for
@samp{comp.lang.objective-c} can be found at @samp{??}.
NEXTSTEP Object-Oriented Programming And The Objective-C Language The GNU Objective C Runtime Library offers everything NeXT's runtime
Addison-Wesley Publishing Company does, including Categories, Protocols, @samp{+poseAs:}, thread-safety,
ISBN 0-201-63251-9 class initialization on demand, delayed loading of classes, and
initialization of static instances (such as @@""-style string objects).
It also has several improvements over NeXT's implementation:
@itemize @bullet
@item NeXT's runtime requires an extra function call (objc_msgSend) for
each message that is sent; (the function looks up the receiving
instance's implementation of the method). GNU's implementation is
faster because it does not use an extra function call. Instead, it
inlines a short piece of code that makes two pointer hops into a method
dispatch table; because the code is inlined, it does not incur the
overhead of a function call.
@item When running in thread-safe mode, NeXT's runtime must aquire a
global mutual exclusion lock every time a message is sent; this is
extremely slow. GNU's runtime, amazingly, sends messages just as fast
in thread-safe mode as it does in single-thread mode---the code path
does not contain even a single extra instruction! The GNU runtime only
needs locks when certainly structures are written, not read; the
structures are written relatively infrequently: only at class
initialization and when @samp{+poseAs:} is called.
@item GNU's runtime provides ``selector-types'' along with each
selector; NeXT's does not. A selector-type is a string that describes
the C variable types for the method's return and argument values. Among
other uses, selector-types is extrememly helpful for fast distributed
objects implementations, (see GNUstep Base Library Section, below).
@item Many of the GNU functions have different names than their
corresponding NeXT functions; the GNU names conform to the GNU coding
standards.
@item GNU's runtime library has a new class heirarchy manipulating
method called @samp{-transmuteClassTo:}. It can change the class of an
instance to a cousin class of the same instance-size.
@item NeXT's compiler, @samp{cc}, is based on an old version of
@samp{gcc}. GNU's compiler is, of course, the latest version of
@samp{gcc}, and therefore contains all the latest enhancements.
@end itemize
FSF's implementation utilizes a very efficient sparse array for storing
and looking up selectors when performing method calls, and recently has
been enhanced to provide thread safe operation that induces NO overhead
to method calls. It has full support for protocols and categories.
@item What is its current state of development? @item What is its current state of development?
As of this writing 2.7.2 is the most recent version of the GNU Compiler; GNU's Objective C Runtime library has been stable and useable since
it can be obtained at any of the FSF's ftp archives. This version does 1993. Enhancements continue to be made.
not contain the patches for thread safe operation; though a later release
of the compiler will, so you must apply the patch which is distributed
with the GNUstep Base Library and recompile the Objective-C Runtime Library.
The thread safe patch defines a number of functions for maintaining mutual The package @samp{gcc-2.7.2} contains the source for the GNU Objective C
exclusion objects and threads. The NSThread and NSLock type classes compiler and runtime library. It can be obtained from
in the GNUstep Base Library are based upon these underlying functions, but @samp{ftp://prep.ai.mit.edu/pub/gnu}, or any other mirror of the GNU
you can call them directly if you are not using GNUstep. The implementation archives. As far as I know, the GNU Objective C Runtime runs on all,
is based upon a back-end program for the underlying operating system; platforms on which GCC runs.
currently Microsoft Windows NT/95, SGI Unix, and Sun Unix have back-end
tested implementations. Volunteers are solicited for writing additional
back-ends, especially one for Linux which is sorely needed.
Additional detail about the implementation of thread safe operation can be GCC version 2.7.2 does not contain the thread-safe features, but the
found in the source code and related documentation files. The Library next version of GCC will. A patch for thread-safe features is provided
will still operate in a single, non-threaded, environment but any attempt with the latest developer snaphots of the GNUstep Base Library. There
to create a thread will return an error. are currently thread-safe backends for DEC OSF/1, Solaris, IRIX, and
WindowsNT. Volunteers are solicited for writing additional back-ends,
especially one for Linux.
@end enumerate @end enumerate
@c GNU Compiler and Objective-C Runtime Library @c GNU Compiler and Objective C Runtime Library
@section GNUstep Base Library @section GNUstep Base Library
@ -363,12 +397,12 @@ variety of enumeration methods based on invocations.
@item OpenStep's archiving mechanism provides only one choice of backend @item OpenStep's archiving mechanism provides only one choice of backend
format. By backend format, I mean a format for writing C types, such as format. By backend format, I mean a format for writing C types, such as
ints, floats and C strings. The GNUstep archiving mechanism has a clear ints, floats and C strings. The GNUstep archiving mechanism has a clear
separation between frontend and backend. Different backends backend's separation between frontend and backend. Different backends are
are provided. One writes in human-readable and human-editable ASCII provided. One backend writes in human-readable and human-editable ASCII
text, (including programmer-provided text name labels for each of the text, (including programmer-provided text name labels for each of the
items.) Another writes in a compact, stream machine-independent bits. items.) Another writes in a compact, stream machine-independent bits.
A third writes in an even more compact stream of machine-dependent bits; A third writes in an even more compact stream of machine-dependent bits;
this is useful for a distributed objects connection on machines of the this is useful for distributed objects connections on machines of the
same architecture. same architecture.
I'm not sure how OpenStep's archiving system implements forward I'm not sure how OpenStep's archiving system implements forward
@ -434,11 +468,11 @@ Collection Root all the collection classes (abstract)
Queue First in, first out Queue First in, first out
Stack First in, last out Stack First in, last out
GapArray Efficient handle middle insert and delete GapArray Efficient handle middle insert and delete
LinkedList More efficient than arrays for many ops LinkedList More efficient than arrays for some ops
Strings (as in Smalltalk, part of the collection class heirarchy): Strings (as in Smalltalk, part of the collection class heirarchy):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConstantString Root of string classes, not changable ConstantString Root of string classes, chars not changable
String contents can be changed String contents can be changed
*CString Strings based on 1-byte characters *CString Strings based on 1-byte characters
@ -529,6 +563,7 @@ It provides functionality that aims to implement the @samp{AppKit}
portion of the OpenStep standard. However the implementation has portion of the OpenStep standard. However the implementation has
been written to take advantage of GNUstep enhancements wherever possible. been written to take advantage of GNUstep enhancements wherever possible.
@item Explain the organization of the front- and back-ends. @item Explain the organization of the front- and back-ends.
The GNUstep GUI Library is divided into a front- and back-end. The The GNUstep GUI Library is divided into a front- and back-end. The
@ -558,13 +593,14 @@ A number of classes in the front-end are complete or almost complete;
these include: NSActionCell, NSButtonCell, NSButton, NSCell, NSControl, these include: NSActionCell, NSButtonCell, NSButton, NSCell, NSControl,
NSEvent, NSFont, NSResponder, and NSSlider. NSEvent, NSFont, NSResponder, and NSSlider.
These classes are complete enough to use but still require some major Other classes are complete enough to use, but still require some major
additions before being considered almost complete: NSApplication, NSBox, additions before being considered almost complete: NSApplication, NSBox,
NSColor, NSFontManager, NSMenu, NSMenuCell, NSPopUpButton, NSSliderCell, NSColor, NSFontManager, NSMenu, NSMenuCell, NSPopUpButton, NSSliderCell,
NSText, NSTextField, NSTextFieldCell, NSView, and NSWindow. NSText, NSTextField, NSTextFieldCell, NSView, and NSWindow.
All remaining classes have stub implementations. All remaining classes have stub implementations.
@item What is the current state of development of the X/DPS back-end? @item What is the current state of development of the X/DPS back-end?
@ -602,28 +638,31 @@ able to find it in @samp{ftp://alpha.gnu.ai.mit.edu/gnu}.
@item What is the Interface Modeller? @item What is the Interface Modeller?
Interface Modeller in its simplest form is an application for visually Interface Modeller, in its simplest form, is an application for visually
constructing and prototyping graphical user interfaces. At a more constructing and prototyping graphical user interfaces. At a more
abstract level, it is a tool for connecting instances of Objective-C abstract level, it is a tool for connecting instances of Objective C
classes to create a graph of objects; this graph is a model of an classes to create a graph of objects; this graph is a model of an
executable program that Interface Modeller can save to a file to be executable program that Interface Modeller can save to a file to be
loaded and executed later outside of Interface Modeller. loaded and executed later outside of Interface Modeller.
@item What is its current state of development? @item What is its current state of development?
It is in the specification stage; no code has been written yet. You It is in the specification stage; no code has been written yet. The
may read the current specifications at the GNUstep WWW pages. current specifications are available through the GNUstep WWW pages.
@end enumerate @end enumerate
@c GNUstep IM @c GNUstep IM
@format
@ignore
[Notes to FAQ contributors: Be succinct. Stick to the facts. Emphasize [Notes to FAQ contributors: Be succinct. Stick to the facts. Emphasize
technical features that are already implemented; avoid writing about technical features that are already implemented; avoid writing about
vague features without concrete ideas about their implementation; (the vague features without concrete ideas about their implementation. Your
IM section, for example, may be short?). Your audience is future and audience is future and present code contributors to GNUstep, not
present code contributors to GNUstep, not managers or publicity people.] managers or publicity people.]
@end ignore
@format
All trademarks mentioned on in this FAQ belong to their respectful All trademarks mentioned on in this FAQ belong to their respectful