Pages

20170911

Design Principles Behind Smalltalk by Daniel H. H. Ingalls

Design Principles Behind Smalltalk

  • The purpose of the Small talk project is to provide computer support for the creative spirit in everyone.
  • Personal Master: If a system is to serve the creative spirit, it must be entirely comprehensible to a shingle individual.
  • The point here is that the human potential manifests itself in individuals. To realize this potential, we must provide a medium that can be mastered by a single individual.
  • Any barrier that exists between the user and some part of the system will eventually be a barrier to creative expression.
  • Good Design: A system should be built with a minimum set of unchangeable parts; those parts should be as general as possible; and all parts of the system should be held in a uniform framework.
  • Everything we known about how people think and communicate is applicable. The mechanisms of human thought and communication have been engineered for millions of years, and we should respect them as being of sound design.
  • A person is presented as having a body and a mind. The body is the site of primary experience, and, in the context of this discussion, it is the physical channel through which the universe is perceived and through which intentions are carried out. Experience is recorded and processed in the mind. Creative though can be viewed as the spontaneous appearance of information in the mind. Language is the key to that information.
  • Purpose of Language: To provide a framework for communication.
  • In human interaction, much of the actual communication is achieved through reference to shared context, and human language is built around such allusion.
  • Scope: The design of a language for using computers must deal with internal models, external media, and the interaction between these tin both the human and the computer.
  • Communication between two people (or between one person and a computer) includes communication on two levels. Explicit communication includes the information that is transmitted in a given message. Implicit communication includes the relevant assumptions common to the two beings.
  • We can associate a unique identifier with an object, and, from that time on, only the mention of that identifier is necessary to refer to the original object.
  • Objects: A computer language should support the concept of "object" and provide a uniform means for referring to the objects in its universe.
  • Uniform reference is achieved simply be associating a unique integer with every object in the system. This uniformity is important because it means that variables in the system can take on widely differing values an yet can be implemented as simple memory cells.
  • When all references to an object have disappeared from the system, the object itself vanishes, and it's storage is reclaimed.
  • Storage Management: To be truly "object-oriented", a computer syst3m must provide automatic storage management.
  • A way to find out if a language is working well is to see if programs look like they are doing what they are doing.
  • If they [programs] are sprinkled with statements that relate to the management of storage, then their internal model is not well matched o that of humans.
  • Messages: Computing should be viewed as an intrinsic capability of objects that can be uniformly invoked by sending messages.
  • Just as programs get messy if object storage is dealt with explicitly, control in the system becomes complicated if processing is performed extrinsically.
  • A possible solution is to call a general addition routine that examines the type of the arguments to determine the approximate action,. This is not a good approach because it means that this critical routine must be edited by novices who just want to experiment with their own class of numbers. It is also a poor design because intimate knowledge about the internals of objects is sprinkled throughout the system.
  • Smalltalk provides a much cleaner solution: it sends the name of the desired operation, along with any arguments, as a message to the number, with the understanding that the receiver knows best how to carry out the desired operation.
  • The transmission of messages is the only process that is carried on outside of objects and this is as it should be, since message travel between objects.
  • Uniform Metaphor: A language should be designed around a powerful metaphor that can be uniformly applied in all areas.
  • Every object in Smalltalk, even a lowly integer, has a set of messages, a protocol, that defines the explicit communication to which that object can respond.
  • A uniform metaphor provides a framework in which complex systems can be built.
  • Modularity: No component in a complex system should depend on the internal details of any other component.
  • As the number of components in a system increases, the chances for unwanted interaction increase rapidly. Because of this, a computer language should be designed to minimize the possibilities  of such interdependence.
  • If there are N components in a system, then there are roughly N-squared potential dependencies between them.
  • If computer systems are ever to be assistance in complex human tasks, they must be designed to minimize such interdependence.
  • The message-sending metaphor provides modularity by decoupling the intent of a message (embodied in its name) from the method used by the recipient to carry out the intent.
  • The complexity of a system can often be reduced by grouping similar components.
  • Classification: A language must provide a means for classifying similar objects, and for adding new classes of objects on equal footing with the kernel classes of the system.
  • Classes are the chief mechanism for extension in Smalltalk.
  • Polymorphism: A program should specify only the behavior of objects, not their representation.
  • Factoring: Each independent component in a system would appear in only one place.
  • Smalltalk encourages well-factored designs through inheritance. Every class inherits behavior from its superclass.
  • Leverage: When a system is well factored, great leverage is available to users and implementers alike.
  • It is natural to ask what set of primitive operations would be sufficient to support an entire computing system. The answer to this question is called a virtual machine specification.
  • Virtual Machine: A virtual machine specification establishes a framework for the application of technology.
  • A user interface is simply a language in which most of the communication is visual.
  • Reactive Principle: Every component accessible to the user should be able to present itself in a meaningful way for observation and manipulation.
  • Operating System: An operating system is a collection of things that don't fit into a language. There shouldn't be one.
  • Sometime the advance of computer systems seems depressingly slow. We forget that steam engines were high-tech to our grandparents.
  • Computer systems are, in fact, getting simpler and, as a result, more usable.
  • Natural Selection: Languages and systems that are of sound design will persist, to be supplanted only by better ones.

No comments:

Post a Comment