Concepts of Programming Languages – Chapter 1 Answers

Name: Joezhanjaya
NIM: 1601215790
Class: 02PBT

Concepts of Programming Languages – Chapter 1 Answers

Review Questions

1.      Why is it useful for a programmer to have some background in language design, even though he or she may never actually design a programming language?

Because it will increase the ability to express ideas and choosing the most suitable language to create some program. Also make us easier to learn another programming language because we already known some concept which is similar to the new language.

7.   What is the disadvantage of having too many features in a language?

It makes the language more difficult to be learned. Programmers often learn a subset of the language and ignore its other features.

8.   How can user-defined operator overloading harm the readability of a program?

User-defined operator overloading can makes an operator has more than one meaning, and that will effects the program readability.

13. What does it mean for a program to be reliable?

A program is said to be reliable if it performs to its specifications under all conditions.

14. Why is type checking the parameters of a subprogram important?

Because by checking the data type, errors can be detected before the program runs. So it makes us easier to repair the program.

15. What is aliasing?

Aliasing is having two or more distinct names that can be used to access the same memory cell.

16. What is exception handling?

Exception handling is the ability of a program to intercept run-time errors (as well as the unusual conditions detectable by the program), take corrective measures, and then continue is an obvious aid to reliability.

17. Why is readability important to writability?

Readability is important to writability because if the codes are difficult to read, it will be difficult to repair an error. So the programmer should write the codes easily to read.

Problem Set

1.      Do you believe that solving a problem in a particular algorithmic step requires programming language skills? Support you opinion.

Yes, because if we don’t have a programming language skills the algorithmic steps we made will not be easy to be coded.

2.      Who is said to be the first programmer in human history?

Based on Wikipedia, she was Ada Lovelace. She was an English mathematician and writer chiefly known for her work on Charles Babbage’s early mechanical general-purpose computer, the Analytical Engine. Her notes on the engine include what is recognized as the first algorithm intended to be processed by a machine. Because of this, she is often considered the world’s first computer programmer.

6.   Which characteristic of programming language do you think are the most important and why?

The most important characteristic of programming language is its readability. It will be easier to fix an error if the program’s code is easy to read. If the programing language easy to read, it should be easy to write too.

7.   Java uses a semicolon to mark the end of all statements. What are the advantages for and against this design?

The advantage is it can increase the program readability. The semicolon makes the end of statements clear but also this can makes a fatal error if the programmer missed a semicolon.

8.   Most languages use functions and subroutines. What are the pros and cons of this design decision?

Pros: by using functions we can easily trace or fix the error. Cons: if there is an error with some function output which is an input for other function the program can be totally messed.

9.   Explain how orthogonality in a programming language is closely related to simplicity.

The more orthogonality of a language can makes the code simpler. We can use or combined some simple primitive constructs to solve a complex problem easier than using so many constructs, and that makes the code simpler, easy to read, learn, and understand.

12. Can we call any programming language complete, in your opinion? Why or why not?

No, because any programming language won’t be able to express all our ideas easily. The programmer is the one who should combine all the available features to solve the problems or express the ideas.

13. Was the first high-level programming language you learned implemented with pure interpreter, a hybrid implementation system, or a compiler?

C was the first high-level programming language I learned and it was implemented with compiler method.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s