Jump to content

Objective C: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
[[Apple]] acquired their toolset from [[NeXT]], who in turn acquired their kit from [[Stepstone Corporation]].
[[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 form 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.
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 to Objective-C 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-dependant code and when real time code or other time-dependant is being written it is best to avoid the dynamic functions altogether.
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
*GNU GCC (EMX) - Open source
*[http://users.telenet.be/stes/compiler.html Portable Object Compiler] - Open source
*Portable Object Compiler - Open source
*Stepstone [[Objective-C]] Compiler v4.0
*Stepstone [[Objective-C]] Compiler v4.0


Line 25: Line 25:
* Brad J. Cox: ''Object-Oriented Programming: An Evolutionary Approach'' - Addison-Wesley 1987, ISBN 0-201-10393-1
* 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
* 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
* 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