[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: person interested in GNUstep development
From: |
David Chisnall |
Subject: |
Re: person interested in GNUstep development |
Date: |
Fri, 22 Feb 2013 12:13:17 +0000 |
On 22 Feb 2013, at 10:56, Maxthon Chan <address@hidden> wrote:
> Dear Johan:
>
> Hello.
>
> 1) Objective-C 2.0 is creation of Apple Inc. and is incorporated into OS X
> 10.5 (partially) / 10.7 (completely) and iOS 4.3 (partially) / 5.0
> (completely). For GNUstep, the latest svn build of GNUstep can support most
> of the Objective-C 2.0 features if using clang as the compiler.
Objective-C 2 does not define a language, it is a brand. It meant NeXT-style
Objective-C with the new exception syntax, fast enumeration, and declared
properties. Newer versions of Objective-C do not have version numbers
(possibly because we mocked Apple for releasing Objective-C 2 as the release
after Objective-C 4, which was the last version number that NeXT gave to the
language).
Newer (post-Objective-C-2) features are:
- Interoperable exceptions (C++ throw and catch works with Objective-C types,
an Objective-C object thrown with throw can be caught with @catch).
- Blocks (not just Objective-C, but heavily used in Objective-C, and with
runtime support for using blocks as methods)
- Garbage collection (introduced and then deprecated, as the semantics were
very poorly thought out)
- Lots of new runtime features (e.g. associated objects)
- Automatic reference counting
- Braindead syntax for number literals and collections.
All of these are supported by the combination of clang and the GNUstep
Objective-C runtime. We also support a few features beyond those in Apple's
implementation:
- Typesafe dispatch. Selectors with mismatched types will cause stack
corruption on Apple's runtime, raise an exception on ours.
- Prototype-based orientation. You can add methods to individual objects.
> Due to historical reasons that is related to versions and changes of GPL
> license and Apple Inc, GCC never get full Objective-C 2.0 support. Apple is
> now participating in another compiler project, clang, which is now the
> leading compiler for Objective-C and implemented full Objective-C features.
There were various reasons for Apple discontinuing GCC support. The GPL was
one, but the poor layering in GCC was another - it's very hard technically to
reuse GCC front ends for things like syntax highlighting, refactoring tools,
and so on, even if the license is not a problem.
David