Prev | Next |
Goals in language design |
---|
There are often tradeoffs. For example, if you want the greatest efficiency, you would use assembly language. All other goals would suffer. |
Development of programming languages |
---|
|
General rules for designing programming languages | ||||||||
---|---|---|---|---|---|---|---|---|
|
Modification and encapsulation |
---|
The majority of the time, programmers are modifying existing programs rather than starting new ones. A programming language should provide features to ease modification. The usual method is to use encapsulations. An encapsulation hides certain things inside itself, so that the programmer knows that those things are not visible from outside. Any modification to the hidden things only affects that one encapsulation. Examples of encapsulations are:
Useful concepts for encapsulation are intension and extension. The intension describes the visible aspects of something, what it is intended to do or to represent. The extension tells how that thing is implemented now (possibly to be changed tomorrow). Working with intensions instead of extensions makes programs more modifiable. |
Reusable software |
---|
Programming languages should facilitate producing reusable libraries. To be useful, libraries must be as general as possible. They should handle
Because of the need for generality, libraries tend to put the most stress on programming language design. |
Prev | Next |