This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [OFFTOPIC] Objective-C vs. gcj (was: Re: Newbie questions)


Kresten Krab Thorup wrote:

> The term `categories' stems from Smalltalk terminology.  In the file
> format for `filing in' code in a ST system, there is syntax that
> allows methods to be added to existing classes.  This is exactly the
> functionality of categories.  

The last time I used Smalltalk-80 based systems such as VisualWorks or 
Squeak categories were a mechanism to collect classes which logically 
belong together. For example the classes 'String', 'Symbol' and 'Text'
are grouped in the category 'Collections-Texts'. Obviously you see the 
analogy to java packages. The big difference and disadvantage of 
putting a class into a Smalltalk category doesn't imply a different 
namespace. But, the latest VisualWorks implementations do have namespace
facilities. Furthermore, the initial idea behind categories was not the 
ability of grouping together during fileins. If you filein a class whose 
category doesn't exists, it will be created. Also, Smalltalk-80 based 
systems allow to group methods of classes into a unit which are called 
protocols, e.g. 'new' and 'from:' into the protocol 'instance creation'.

Jörg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]