Review question
Tugas Pak Tri Djoko Wahjono
11. What primitive control statement is used to build more complicate control statements in languages that lack them?
The selection statement plus GOTO is used to build more complicated control statements such as FOR loop.
12. What construct of a programming language provides process abstraction?
Subprograms
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 parameter of a subprogram important?
It can lead to lots of hard to debug errors.
15. What is aliasing?
2 or more distinct names that can be used to access the same memory cell.
Problem Set
11. Describe some design trade-offs between efficiency and safety in some language you know
C provides a good background in programming basics. It's been called a glorified Assembler. Java provides a great introduction to Object Oriented Programming. Languages are designed for a purpose, there's really no better or worse. It mostly depends on what you are aiming for.
12. In your opinion, what major features would a perfect programming language include?
In my opinion Syntax, documentation, and error message are the most important features in a perfect programming language.
13. Was the first high-level programming language you learned implemented with a pure interpreter, a hybrid implementation system, or a compiler? (You may have to research this.)
My first high-level programming language I learned is C++ which is implemented with visual C++ and it is a compiler.
14. Describe the advantages and disadvantages of some programming environment you have used.
Visual basic is a proprietary programming language,so programs written in Visual basic cannot, easily, be transferred to other operating systems.There are versions of Basic that run on several operating systems, but they aren't direct clones of VB so some work would have to be done.
15. How do type declaration statements for simple variables affect the readability of a language, considering that some languages do not require them?
The use of type declaration statements for simple scalar variables may have very little effect on the readability of programs. If a language has no type declarations at all, it may be an aid to readability, because regardless of where a variable is seen in the program text, its type can be determined without looking elsewhere.
Tidak ada komentar:
Posting Komentar