Objective-C: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Traduzione |
||
Riga 574:
=== Portable Object Compiler ===
Besides the [[GNU Compiler Collection|GCC]]/[[NeXT]]/[[Apple Computer]] implementation, which added several extensions to the original [[Stepstone]] implementation, there exists another free open-source Objective-C implementation, which implements a slightly different set of extensions: The Portable Object Compiler [http://users.pandora.be/stes/compiler.html] implements, among other things, also [[Smalltalk]]-like blocks for Objective-C.
-->
== Analisi del linguaggio ==
{{T sezione|lingua=inglese|argomento=informatica|data=febbraio 2008}}
L'implementazione dell'Objective C usa un semplice [[
<!--
Likewise, the language can be implemented on top of existing C compilers (in [[GNU Compiler Collection|GCC]], first as a preprocessor, then as a module) rather than as a new compiler. This allows Objective-C to leverage the huge existing collection of C code, libraries, tools, and mindshare. Existing C libraries — even in object code libraries — can be wrapped in Objective-C [[Adapter pattern|wrappers]] to provide an OO-style interface.<br>
All of these practical changes lowered the [[Barriers to entry|barrier to entry]], likely the biggest problem for the widespread acceptance of Smalltalk in the 1980s.
Riga 588 ⟶ 589:
Unlike [[C++]], Objective-C does not support [[operator overloading]]. Also unlike C++, Objective-C allows an object only to directly inherit from one class (forbidding [[multiple inheritance]]). As Java was influenced by the design of Objective-C, the decision to use single inheritance was carried into Java. Categories and protocols may be used as alternative functionality to multiple inheritance; Java however lacks categories.
-->
=== Differenze filosofiche tra Objective C e C++ ===
Il progetto e l'implementazione del [[C++]] e dell'Objective C rappresentano due diversi approcci all'
Oltre alla [[programmazione strutturata]] del C, C++ supporta direttamente la [[programmazione ad oggetti]], la programmazione generica e la [[metaprogrammazione]]. C++ è inoltre corredato di una estesa [[libreria (informatica)|libreria]] standard che include numerose [[ogetto container (informatica)|classi container]]. L'Objective C, invece, aggiunge solo delle caratteristiche [[object-oriented]] al C; esso, nella sua versione più "pura" non offre lo stesso numero di in termini di librerie standard, ma in molti contesti dove viene usato, viene corredato di una libreria sul modello di quella di [[OpenStep]], di [[Cocoa]] o di [[GNUstep]] le quali forniscono funzionalità sinili a quelle offerte dalla libreria standard di C++.▼
▲Oltre alla [[programmazione strutturata]] del C, C++ supporta direttamente la [[programmazione ad oggetti]], la programmazione generica e la [[metaprogrammazione]]. C++ è inoltre corredato di una estesa
<!--
One notable difference is that Objective-C provides runtime support for some [[reflection (computer science)|reflective]] features, whereas C++ adds only a small amount of runtime support to C. In Objective-C, an object can be queried about its own properties, for example whether it will respond to a certain message. In C++ this is not possible without the use of external libraries; however, it is possible to query whether two objects are of the same type (including built-in types) and whether an object is an instance of a given class (or [[superclass (computer science)|superclass]]).
|