Manaphy91 ha scritto:
Visto che siamo nella sezione Bar ed è il topic corretto ne approfitto per porre i seguenti quesiti a cui da tempo non trovo risposte chiare:
- che utilità ha, ad oggi, imparare un linguaggio come Smalltalk?
- in che ambiti è stato usato e soprattutto è ancora usato?
(Badate bene che non sono fatte con un intento fazioso o simili ma solo per capire se può essere un valore aggiunto o meno nelle skill programmative di una qualsiasi persona... (b2b))
Grazie in anticipo!!
Quoto quanto detto da @Zoff (per cio che mi riguarda oltre che per ragioni storiche anche perchè la maggior parte di testi che mi sono passati per le mani si faceva prima o poi riferimento al modello procedurale; qui invece si comincia con gli oggetti e si finisce con gli oggetti;
il concetto di tipo non è contemplato. Smalltalk è un
linguaggio ad oggetti puro a differenza di diciamo C++ che è un
linguaggio ad oggetti ibrido ossia procedurale che con opportune estensioni diventa un ling ad oggetti --i ling multiparadigma(ibridi) tipo C++ sono più flessibili nella vita di ogni giorno ma d' altro canto tentano lo sviluppatore a pensare ed usare procedure e dati anzichè oggetti--)
Many language designers have taken the hybrid approach. That is, object oriented constructs have either been grafted on to, or intermixed with, the language. In some cases the idea has been to enable a developer to take advantage of object orientation when it appears appropriate. In other situations it has been to ease the transition from one approach to another.
The result has often been a less than satisfactory state of affairs. Not only does it mean that many software developers have moved to their new object oriented language believing that it is just a matter of learning the new syntax, (it isn’t), they have proceeded to write procedural programs in which the use of objects is limited to holding data, believing that this will be sufficient (it won’t).
It is really only safe to move to a hybrid language once you have learnt about object technology using a pure object oriented language.
ma riguardo il suo uso malgrado non di moda oggi nella massa non si può dire (alla stregua pure del Fortran/Lisp ecc) che sia un lingo trascurabile/morto nella
babel dei linguaggi esistenti(di cui vedi solo una particina nel screenshot --incentrato solo nell' intorno di smalltalk--)
Credo Questa risposta --tratta da
http://damirhorvat.wordpress.com/2009/0 ... essionals/ -- cade all' uopo alla tua domanda:
Smalltalk was presented as right choice for demanding and complex environments where high flexibility, robustness and speed of development are main requirements.
dai pure un occhio qui:
http://stackoverflow.com/questions/1490 ... -smalltalk
http://stackoverflow.com/questions/7111 ... lk-popular
Alla fine sono profondamente convinto che uno studio della babel dei linguaggi o meglio della teoria dei linguaggi sia indispensabile o se vuoi ad ogni modo di valor aggiunto allo skill di qualsiasi developer. Tutto cio non tanto per sapere a menadito ogni virgola di ogni linguaggio ma per individuare punti forti e deboli di ognuno per poter poi decidere quale va meglio per una data applicazione.
Per tua comodità eccoti una carellata di alcuni dei OOP(scusa l' inglesismo, non è gratuito ma tendo a non reinventare la ruota quando la trovo):
Simula
Based on Algol 60, Simula was the first object–oriented language. It introduced
the concepts of class, inheritance and polymorphism .
Smalltalk
The Smalltalk language and programming environment was developed at Xerox
Palo Alto Research Center in the 1970’s and early 1980’s. The graphical
programming environment greatly influenced the development of the Apple
Macintosh and later windowing systems such as X11 and Microsoft Windows.
When first developed, Smalltalk broke new ground as the first uniformly object–
oriented language (every data item is an object). Today, over 30 years later, there
are still few languages or environments that match the sophistication of its
incremental compiler and the extensibility of both its language and
environment.
Nowadays, there are several implementations of Smalltalk available.
The ParcPlace Systems implementation is a direct descendant of earlier Xerox
versions, whereas others have arrived on the scene more recently.
Eiffel
Eiffel builds on the concepts of Simula by adding multiple inheritance and semi–
formal class specifications in an attempt to produce a pure object–oriented
language compatible with current approaches to software engineering.
Class invariants and operation pre– and post–conditions may be expressed
algebraically in a class specification. Consequently this allows a large degree of
compile–time and run–time correctness checking.
The Eiffel library contains numerous classes for common data structures, parsing
and scanning libraries, and an interface with the X11 window system.
C++
An extension to C designed by Bjarne Stroustrup of AT&T Bell Laboratories —
the home of the C language. The AT&T product is a translator that converts C++
into C, which you then compile with a compiler of your choice, other vendors
provide products that compile C++ directly.
Its main influence was Simula, rather than Smalltalk, and so it remains a
strongly–typed language.
There is no “standard” library of classes to compare with that of Smalltalk–80,
although there are libraries for different application areas.
Objective–C
Objective–C extends the C language by the introduction of classes and a new data
type, id, which is a reference to any object. Objective–C is modelled on
Smalltalk–80 and has the same typeless nature, although simple data items, such
as integers and reals, remain in C.
It is a pre–processor that translates the object–oriented extensions into
conventional C code, which is then fed to a standard C compiler. Objective–C
comes with a class library in source form which is a useful aid to learning the
basics. It initially achieved popularity through its use on the NeXT machine,
bundled with Interface Builder (also written in Objective–C).
C+@
C+@ (pronounced ‘cat’) is another language based on C by AT&T Bell Labs,
derived from their Calico language. It is closer to Smalltalk than C++ since it is a
true object–based language in which all data items are objects, although it retains
the language syntax of C.
Again, like Smalltalk, it provides a graphical programming environment and a
large class library, written in C+@ and available in source.
Object Pascal
An extension to Pascal developed as a systems programming tool at Apple.
Object Pascal is a simple object–oriented language, but lacks some of the more
complex ideas present in Smalltalk–80.
It has been used to produce a large variety of Macintosh applications. The
language is in the Simula mould, and (like C++) it uses an extension of the
existing record structure to implement classes. Microsoft’s Quick Pascal is based
closely on Object Pascal, with nearly identical syntax.
CLOS
The Common Lisp Object System is an extension to Common Lisp, itself a
standardised version of Lisp. An object in CLOS is an instance of a class and a
class may inherit from many other classes (multiple inheritance). However,
CLOS does not have any notion of message–sending.
SELF
SELF is an object–based language whose syntax is similar to Smalltalk. One
difference is that SELF doesn’t have the notion of a class. An object is derived
from another (its prototype) by copying and refinement. Another difference is
that no distinction is made between instance variables and methods — they are
both called slots. On the face of it, SELF is an immensely powerful language;
however, its disadvantages shouldn’t be overlooked: it’s still a research project
and requires a large amount of memory and a big machine to run (in 2000 a Sparc–10 &
64MB, preferably).
Dylan
Dylan (which stands for “DYnamic LANguage”) is a new object–oriented
language originally developed by the Eastern Research and Technology Labs of
Apple Computer. It most closely resembles CLOS and Scheme, but has been
influenced by Smalltalk and SELF. At present its design is still fluid, and there are
no commercial implementations.
Bene che si evince finora?
1. che Apple ha un ruolo attivo nel mondo degli oggetti; Non aspetterei diversamente da quel geniaccio di Steve Jobs(riposi in pace)
2. che se non conosci un minimo tutto il filo che porta da simula/smalltalk --o anche prima se vuoi estendere la tua conoscenza-- ai giorni nostri è normale che si avrà una visione tronca degli strumenti a tua disposizione.
A differenza di altri linguaggi la famiglia di implementazioni(non ultima quella di GNU) smalltalk è parecchio nutrita dai un occhio a
http://en.wikipedia.org/wiki/Smalltalk
NB: L' OOP non ha a che fare con la programmazione in small ma con quella in large(è uno strumento da Ingegneria del software).
Insomma teoricamente il tutto si potrebbe benissimo fare pure in linguaggio macchina(dai per non essere masocchisti allo stato puro diciamo in assembly) se non ci fosse nient' altro --Ci vorrebbero parecchi eoni uomo in più--. Ma l' astrazione(l' OO eleva il livello dell' astrazione gia esistente) si dimostra essere uno strumento indispensabile per arrivare dove siamo adesso
Ripassiamo un po :
The Advantages of Object–Oriented Programming
It is worth reiterating the main points concerning
object–oriented programming:
• An object is a combination of some local state (represented as internal
variables) and the operations by which that state may be accessed and
manipulated — this is called encapsulation.
• The state of an object is not directly accessible from outside that object —
this is called information hiding.
• Message–sending is the only means of performing operations.
• A message specifies which operation is requested, the corresponding
method contains the expressions to be evaluated.
• Every object is an instance of a class.
• Classes are arranged in a hierarchy.
• Every class has a superclass (except the root class Object in Smalltalk–80).
• A subclass inherits the behaviour of its superclass.
• Message–sending is a polymorphic operation.
These properties provide the programmer with the following useful features:
• An object encapsulates state and methods, and consequently the use of
objects provides data protection without excessive specification.
• By separating the user of an object from the implementer, the user is no
longer aware of how an object is implemented. Users, then, can only
manipulate an object by using those messages provided by the
implementer. This has the benefit that the programmer can change the
internal implementation of an object and, keeping the message interface
constant, have no detrimental effect on the applications using that object.
This in turn promotes a modular programming style.
• Similarly, separating what happens from how it happens promotes the
reuse of code.
• The use of inheritance and polymorphism promotes differential
programming, or programming by modification.
• The description of a system in terms of objects, and of objects in terms of
possible behaviour (as defined by messages), permits modular design.
Object–oriented programming minimises the number of assumptions that
different parts of a program make about each other, therefore reusing
some components of a program written for one application in another
application is easy.
@Zoff: scusa per l' incasinamento del post