Objective-C: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Riga 579:
{{T sezione|lingua=inglese|argomento=informatica|data=febbraio 2008}}
L'implementazione dell'Objective C usa un semplice [[run-time system]] scritto in [[linguaggio C]] che aumenta di poco la dimensione delle applicazioni. Al contrario, la maggior parte dei sistemi object-oriented esistenti quando fu creato (e [[Java (linguaggio)|Java]] tuttora) usava una grossa [[macchina virtuale]] invasiva per l'intero sistema. I programmi scritti in Objective C tendono a non essere troppo più grandi delle dimensioni del loro [[codice oggetto]] e delle [[libreria software|librerie]] usate (che generalmente non devono essere incluse nel codice distribuito), al contrario ad esempio dei sistemi [[Smalltalk]] dove grandi quantità di memoria sono necessarie semplicemente per aprire una [[finestra (informatica)|finestra]].
<!--
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.
 
Il linguaggio può essere implementato con un compilatore C (in [[GNU Compiler Collection|GCC]], prima come un [[preprocessore]] ed in seguito come un modulo del compilatore) piuttosto che con un nuovo compilatore. Ciò consente all'Objective C di sfruttare l'enorme mole di codice, librerie e strumenti già esistenti in C che può essere adattata in Objective C per fornire un'interfaccia object-oriented. Tutte questi fattori riducono le barriere d'ingresso al nuovo linguaggio, fattore che costituì il problema principale di Smalltalk negli anni '80.
 
<!--
The first versions of Objective-C did not support [[garbage collection (computer science)|garbage collection]]. At the time this decision was a matter of some debate, and many people considered long "dead times" (when Smalltalk did collection) to render the entire system unusable. Although some 3rd party implementations have added this feature (most notably GNUstep), Apple implemented it as of [[Mac OS X v10.5]]. But it is unavailable to applications targeting older versions of the Mac OS<ref>{{cite web|url=http://www.apple.com/macosx/developertools/xcode.html|title=Mac OS X Leopard – Xcode 3.0|author=Apple, Inc.|year=[[August 22]] [[2006]]|=publisher=apple.com|accessdate=2006-08-22}}</ref>