An assignment from Mr. Tri Djoko Wahyono. As what the title said, it is the answer for some question (10 numbers, quite randomly in Review Qustion and 6 numbers in Problem Set) in Chapter 1 in "Concept of Programming Language" book.
Review Question
6. In what language is most of UNIX written?
UNIX is written almost entirely in C.
7.What is the disadvantage of having too many features in a language?
Having too many features in a language will make a disadvantage at many things too, like the cost for the program or else, because every features in a language has its own drawback. For example, many operators in a language improve the writability greatly, but lower the readability.
9. What is one example of a lack of orthogonality in the design of C?
C is usually specified with variables and assignment statements.
14. Why is type checking the parameters of a subprogram important?
Type Checking is an important because the earlier errors in program are detected, the less expensive it is to make the required repairs.
15. What is aliasing?
In this context, 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 an ability of a program to intercept run-time errors, take corrective measures, and then continue the program.
19. What have been the strongest influence on programming language design over the past 50 years?
Imperative language is, the most popular language and has the strongest influences in programming language, in past 50 years that has been designed around the prevalent computer architecture (von Neumann architecture).
20. What is the name of the category of programming languages whose structure is dictated by the von Neumann computer architecture?
Imperative.
21. What two programming language deficiencies were discovered as a result of the research in software development in the 1970s?
The incompleteness of type checking and inadequacy of control statements (requiring the extensive use of gotos).
23. What language was the first to support the three fundamental features of object-oriented programming?
Smalltalk.
Problem Set
2. Who is said to be the first programmer in human history? Use the internet for help.
The person who is said to be the first programmer in human history is Ada Lovelace.
4. In what way do the languages for scientific application differ from the languages for business application? Support your view.
>>In scientific application, the languages is used to make data structures that are arrays and matrices, to do calculation with large numbers of floating-point, and such. The primary concern here is the efficiency.
>> In business application, the languages is used to produce elaborate reports, precise ways of describing and storing decimal numbers and characters data, and such.
6. Which characteristics of programming languages do you think are the most important and why?
I think, reliability is the most important characteristic in a programming languages, because it contains readability and writablility of the language itself. So, when the readability and the writablity of a programming language improves, then reliability of it will improve too, but not only that. The other features, related to reliability, is also important, like Type Checking, Aliasing, and Exception Handling. Without it all, the cost of the programming language will greatly increase and will make the language expensive.
7. Java uses a semicolon to mark the end of all statements. What are the advantages for and against this design?
The advantages of using semicolon in the end of all statements is, it indicate the closure of the statements and it would help if the use instance initialization is needed. But on the other hand, it might trip up the beginner and misunderstood that with C or C++ program.
12. Can we call any programming language complete, in your opinion? Why or why not?
No, because with one characteristic of a language is improving, thus another characteristic might be degrade, like the readability and the writablity of a language. When a language's readability is greatly improves, which means that it can be easily understand by another programmer, then the writability of the language might not be very good. Even when the writability and the readability is improved, the cost for the language might be not as good as that two characteristics.
17. Some programming languages--for example, SQL--use "=" to check the equality of two expression, while C uses it to assign values to variable. Which of these, in your opinion, is most natural and least likely to result in syntax errors? Support your answer.
In my opinion, the use of '=' in C would often make some mistake, because beginners might think that it will be use to check the equality too or it might be because some of languages didn't use '==' for equality checking. So, I would say that the use of '=' in SQL is least likely to result in syntax error.
No comments:
Post a Comment