21.08.2013 Views

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

176 Chapter 14 ■ The basics<br />

and actions. The data description and manipulation facilities of a programming language<br />

should there<strong>for</strong>e allow the programmer to represent “real-world” objects easily<br />

and faithfully. In recent years, increasing attention has been given to the problem of<br />

providing improved data abstraction facilities <strong>for</strong> programmers. We discuss this in<br />

Chapter 15 on programming language features <strong>for</strong> OOP.<br />

As we shall see, most mainstream programming languages have a small core and all<br />

the functionality of the language is provided by libraries. This chapter addresses this<br />

core. Facilities <strong>for</strong> programming in the large are reviewed in Chapter 16. Other features<br />

of languages – exceptions and assertions – are dealt with in Chapter 17.<br />

14.2 ● Classifying programming languages and features<br />

It is important to realize that programming languages are very difficult animals to<br />

evaluate and compare. For example, although it is often claimed that language X is a<br />

general purpose language, in practice languages tend to be used within particular<br />

communities. Thus, Cobol has been the preferred language of the in<strong>for</strong>mation systems<br />

community, Fortran, the language of the scientist and engineer, C, the language<br />

of the systems programmer and Ada, the language <strong>for</strong> developing real-time or embedded<br />

computer systems. Cobol is not equipped <strong>for</strong> applications requiring complex<br />

numerical computation, just as the data description facilities in Fortran are poor and<br />

ill suited to in<strong>for</strong>mation systems applications.<br />

<strong>Programming</strong> languages are classified in many ways. For example, “high-level” or<br />

“low-level”. A high-level language, such as Cobol, Visual Basic or C#, is said to be<br />

problem-oriented and to reduce software production and maintenance costs. A low-level<br />

language, such as assembler, is said to be machine-oriented, facilitating the programmer’s<br />

complete control over the efficiency of their programs. Between high- and lowlevel<br />

languages, another category, the systems implementation language or high-level<br />

assembler, has emerged. Languages such as C attempt to bind into a single language the<br />

expressive power of a high-level language and the ultimate control which only a language<br />

that provides access at the register and primitive machine instruction level can provide.<br />

Languages may also be classified using other concepts, such as whether they are weakly<br />

or strongly typed. This is discussed below.<br />

14.3 ● Design principles<br />

Simplicity, clarity and orthogonality<br />

One school of thought argues that the only way to ensure that programmers will consistently<br />

produce reliable programs is to make the programming language simple. For<br />

programmers to become truly proficient in a language, the language must be small and<br />

simple enough that it can be understood in its entirety. The programmer can then use<br />

the language with confidence, probably without recourse to a language manual.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!