4186
Vývoj / Re:Použití Objective-C mimo Apple
« kdy: 03. 06. 2015, 09:47:44 »To není pravda. Actor model počítá s asynchronním doručováním zpráv (tj. odesílatel nečeká, až bude zpráva doručena a pokračuje ve vykonávání svého kódu), ve Smalltalku (tedy v jazyce, který implementuje OOP tak, jak bylo "původně zamýšleno") je posílání zpráv synchronní (čeká se na odpověď objektu, i kdyby měla být prázdná). To je dost klíčový rozdíl oproti aktorovému modelu.SmallTalk je prostě nějaká implementace myšlenky. Jestli ideální a implementující všechny původní koncepty, to neumím posoudit. Kay sám říká, že "we changed Smalltalk constantly, treating it always as a work in progress" http://lists.squeakfoundation.org/pipermail/squeak-dev/1998-October/017019.html
Citace
In computer terms, Smalltalk is a recursion on the notion of computer itself. Instead of dividing "computer stuff" into things each less strong than the whole—like data structures, procedures, and functions which are the usual paraphernalia of programming languages—each Smalltalk object is a recursion on the entire possibilities of the computer. Thus its semantics are a bit like having thousands and thousands of computers all hooked together by a very fast network. Questions of concrete representation can thus be postponed almost indefinitely because we are mainly concerned that the computers behave appropriately, and are interested in particular strategies only if the results are off or come back too slowly.http://worrydream.com/EarlyHistoryOfSmalltalk/
Citace
The AlanKay definition of OO is largely that given by CarlHewitt for the ActorsModel which is a model of computation, not a programming paradigm. AlanKay has acknowledged explicitly this derivation.http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented
Versions of Smalltalk before Smalltalk-80 were still largely based on the (asynchronous, unidirectional) ActorsModel of computation, but with Smalltalk-80, the developers of SmalltalkLanguage switched entirely to the (synchronous, bidirectional) procedural model, while misleadingly retaining the ActorsModel terminology (such as "messages" for what essentially are procedure calls rather than one-way notifications).
Ale ať nežeru: ok, beru zpět slovo "přesně". V tomhletom se to liší. Šlo mi ale o to, že objekt i aktor jsou oddělené samostatné entity, které komunikují pomocí zpráv.
Úplně správný OOP by mělo umožňovat posílat libovolný zprávy objektu, o kterým vůbec nic nevím. Tj. ne dělat type checking za běhu pomocí nějakých signatur, ale prostě poslat zprávu neznámému objektu na druhé straně planety.
)