Tuesday, March 5, 2013

Answers of Concepts of Programming Languages 10th - Chapter 1

Martin - 1601213690

02 PBT


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?
    * It is useful for a programmer to have some background in language design because it increased capacity to express ideas, improved background for choosing appropriate languages, increased ability to learn new languages, better understanding of the significance of implementation, better use of languages that are already known and overall advancement of computing.

2. How can knowledge of programming language characteristics benefits the whole computing community?
    * Knowledge of programming language benefiting the whole computing community. People can solve their own problems so troubleshooters lose their jobs and it will reduce the number of common sense-lacking questions.

3. What programming language has dominated scientific computing over the past 50 years?
    * FORTRAN

4. What programming language has dominated business applications over the past 50 years?
    * COBOL

5. What programming language has dominated artificial intelligence over the past 50 years?
    * LISP


6. In what language is most of UNIX written?
    * UNIX was written in the language C. In fact, C was created to write the UNIX operating system.

7. What is the disadvantage of having too many features in a language?
    * A disadvantage of having too many features is reduced readability. It also means that a programmer may not be familiar with all the features. This may lead to an abuse of some, disuse of others and even an accidental use of an unknown feature.

8. How can user-defined operator overloading harm the readability of a program?
    * Because the built in operator has the precision and compiler knows all the precision between the operators, and it works on that precision. User can also create its own operator but the compiler does not come to know how to make precision of this operator. Therefore we don't use user-defined operator.

9. What is one example of a lack of orthogonality in the design of C?
    * A struct can be returned from a function but an array cannot.

10. What language used orthogonality as a primary design criterion?
    * LISP a functional language is one in which computations are made primarily by applying function to given program.



Problem Set

1. Do you believe our capacity for abstract thought is influenced by our language skills? Support your opinion.
    * Yes, I do believe. Because when you learned some programming languages, it will help you to improve your capacity for abstract thought naturally, because we can't learn programming languages without using our capacity for abstract thought.

2. What are some features of specific programming languages you know whose rationales are a mystery to you?
    * Honestly, all programming languages that I knew are a mystery for me. So far I just learned language of C. It still make me confuse why a programming language like C can control how the computer works.

3. What arguments can you make for the idea of a single language for all programming domains?
    * Actually, I don't really like to make a single language for all the programming domains because all the programming domains have its own style and that's why it was fun to learn.

4. What arguments can you make against the idea of a single language for all programming domains?
    * All the programming domains have its own style and that's why it was fun to learn.


6. What common programming language statement, in your opinion, is most detrimental to readability?
    * Until now I just learned one programming language, it is C, and I didn't find any detrimental to readability.

8. Many languages distinguish between uppercase and lowercase letters in user-defined names. What are the pros and cons of this design decision?
    * The pros is we can make a tidy program. The cons is sometimes it will be a big mistake if we didn't thorough.



1 comment: