Objective C: Difference between revisions
mNo edit summary |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
A variant of the programming language [[C]] that adds an object system. While conceptually similar to [[C++]] the main difference is that Objective C takes the object system from [[Smalltalk]] while C++ takes it from [[Simula]] | A variant of the programming language [[C]] that adds an object system. While conceptually similar to [[C++]] the main difference is that Objective C takes the object system from [[Smalltalk]] while C++ takes it from [[Simula]]. Also there is greater emphasis on standard libraries for C++ than with Objective C and the latter language has some dynamic features while C++ is unashamedly static. | ||
==History== | |||
''Objective-C'' was a property system supported by one vendor who had trademark rights to the language name and their product was a pre-processor rather than a true compiler. | |||
[[Apple]] acquired their toolset from [[NeXT]], who in turn acquired their kit from [[Stepstone Corporation]]. | |||
Note that the origins of the language tools as a pre-processor meant that it never really gained language features over the years but simply mirrored changes in C, so while C++ and similar languages evolve to become more [[Oberon]] like, with more structured features and garbage collection as default rather than an option (this does not force you to use GC, it just must be a part of the base), Objective-C has stagnated. There have been a few minor niggles that have never been fixed, so when Apple took over the development there were hopes of changes. However after introducing a number of experimental features including a garbage collector, Apple withdrew most if not all of them from their later toolkits which over all is a negative, but on the plus side it means that developing with the old [[GCC]] and Stepstone compilers today is not as painful an experience as you might think, the difference between them and the Apple features comes down to libraries and not language features. | |||
People coming from the C and C++ world often complain that Objective C uses overly verbose syntax in comparison with its relatives, there may be a grain of truth in this but on the other hand it makes Objective C code slightly more readable than C++. Note that the use of the dynamic features of the language slows the code down even if not to the degree that it resembles Smalltalk, however care needs to be taken when doing speed-dependent code and when real time code or other time-dependent is being written it is best to avoid the dynamic functions altogether. | |||
==OS/2 implementations== | ==OS/2 implementations== | ||
* | *GNU GCC (EMX) - Open source | ||
* | *Portable Object Compiler - Open source | ||
* [[ | *Stepstone [[Objective-C]] Compiler v4.0 | ||
==DOS implementations== | ==DOS implementations== | ||
* | *GNU GCC (EMX) - Open source | ||
* | *Portable Object Compiler - Open source | ||
*Stepstone Objective C | *Stepstone Objective-C | ||
==Win-OS/2 implementations== | ==Win-OS/2 implementations== | ||
Line 19: | Line 23: | ||
==Publications== | ==Publications== | ||
* Brad Cox, Andrew Novobilski: ''Object-Oriented Programming: An Evolutionary Approach'' - Addison-Wesley 1991, ISBN 0-201-54834-8 | * Brad J. Cox: ''Object-Oriented Programming: An Evolutionary Approach'' - Addison-Wesley 1987, ISBN 0-201-10393-1 | ||
* Lewis J. Pinson, Richard Wiener: ''Objective-C: Object- | * Brad Cox, Andrew Novobilski: ''Object-Oriented Programming: An Evolutionary Approach'' 2nd edition - Addison-Wesley 1991, ISBN 0-201-54834-8 | ||
* Lewis J. Pinson, Richard Wiener: ''Objective-C: Object-Oriented Programming Techniques'' - Addison-Wesley 1991, ISBN 0-201-50828-1 | |||
* Timothy Budd: ''An Introduction to Object-Oriented Programming'' - Addison-Wesley, ISBN 0-201-54709-0 | |||
* Stephen G. Kochan: ''Programming in Objective-C 2.0'' - 2009, ISBN 0-321-56615-7 | * Stephen G. Kochan: ''Programming in Objective-C 2.0'' - 2009, ISBN 0-321-56615-7 | ||
* Stephen G. Kochan: ''Programming in Objective-C'' - 2013, ISBN 0-321-96760-7 | * Stephen G. Kochan: ''Programming in Objective-C'' - 2013, ISBN 0-321-96760-7 |
Latest revision as of 03:51, 6 November 2022
A variant of the programming language C that adds an object system. While conceptually similar to C++ the main difference is that Objective C takes the object system from Smalltalk while C++ takes it from Simula. Also there is greater emphasis on standard libraries for C++ than with Objective C and the latter language has some dynamic features while C++ is unashamedly static.
History
Objective-C was a property system supported by one vendor who had trademark rights to the language name and their product was a pre-processor rather than a true compiler. Apple acquired their toolset from NeXT, who in turn acquired their kit from Stepstone Corporation.
Note that the origins of the language tools as a pre-processor meant that it never really gained language features over the years but simply mirrored changes in C, so while C++ and similar languages evolve to become more Oberon like, with more structured features and garbage collection as default rather than an option (this does not force you to use GC, it just must be a part of the base), Objective-C has stagnated. There have been a few minor niggles that have never been fixed, so when Apple took over the development there were hopes of changes. However after introducing a number of experimental features including a garbage collector, Apple withdrew most if not all of them from their later toolkits which over all is a negative, but on the plus side it means that developing with the old GCC and Stepstone compilers today is not as painful an experience as you might think, the difference between them and the Apple features comes down to libraries and not language features.
People coming from the C and C++ world often complain that Objective C uses overly verbose syntax in comparison with its relatives, there may be a grain of truth in this but on the other hand it makes Objective C code slightly more readable than C++. Note that the use of the dynamic features of the language slows the code down even if not to the degree that it resembles Smalltalk, however care needs to be taken when doing speed-dependent code and when real time code or other time-dependent is being written it is best to avoid the dynamic functions altogether.
OS/2 implementations
- GNU GCC (EMX) - Open source
- Portable Object Compiler - Open source
- Stepstone Objective-C Compiler v4.0
DOS implementations
- GNU GCC (EMX) - Open source
- Portable Object Compiler - Open source
- Stepstone Objective-C
Win-OS/2 implementations
- Borland Extensions To Objective-C
Publications
- Brad J. Cox: Object-Oriented Programming: An Evolutionary Approach - Addison-Wesley 1987, ISBN 0-201-10393-1
- Brad Cox, Andrew Novobilski: Object-Oriented Programming: An Evolutionary Approach 2nd edition - Addison-Wesley 1991, ISBN 0-201-54834-8
- Lewis J. Pinson, Richard Wiener: Objective-C: Object-Oriented Programming Techniques - Addison-Wesley 1991, ISBN 0-201-50828-1
- Timothy Budd: An Introduction to Object-Oriented Programming - Addison-Wesley, ISBN 0-201-54709-0
- Stephen G. Kochan: Programming in Objective-C 2.0 - 2009, ISBN 0-321-56615-7
- Stephen G. Kochan: Programming in Objective-C - 2013, ISBN 0-321-96760-7
Links
- Beginners Guide to Objective-C Programming
- USENET: comp.lang.objective-c - By now almost exclusively focused on the Apple version of Objective-C and fairly low volume