Monday, October 6, 2014

Assignment 2

Pada post kali ini, saya akan menjawab pertanyaan-pertanyaan Assignment #2 dari Chapter 2, dari buku "Concepts of Programming Languages" karya Robert W. Sebesta.

Review Questions

        1.  What hardware capability that first appeared in the IBM 704 computer strongly affected the evolution of programming languages ? Explain why.
Indexing and floating-point instructions in hardware. Because one of the primary reasons why the slowness of interpretive system was tolerated from the late 1940s to the mid-1950s was the lack of floating-point hardware in the available computers. All floating-point operations had to be simulated in software, a very time-consuming process. Because so much processors time was spent in software floating-point processing, the overhead of interpretation and the simulation of indexing were relatively insignificant. As long as floating-point had to be done by software, interpretation was an acceptable expense.

        2. In what year was the Fortran design project begun ?
In 1954.

        3. What was the primary application area of computers at the time Fortran was designed ?
Mathematic application area.

        4. What was the source of all of the control flow statements of Fortran I ?
704 Instructions.

        5. What was the most significant feature added to Fortran I to get Fortran II ?
The independent compilation of subroutines.

Problem Sets

        6. Make an educated guess as to the most common syntax error in LISP programs.
Undefined escape sequences in literal strings. The backslash character can be used in literal strings and characters :
  • to escape various characters
  • to introduce an escape sequence representing a character


        7. LISP began as a pure functional language but gradually acquired more and more imperative features. Why ?
In developing LISP for artificial intelligence as a functional programming language, but there soon emerged different dialects, cleaners, more modern, and more imperative, that began to deviate from the functional form into Scheme. COMMON LISP combined the different forms into a single form that was more imperative, including assignment and iteration.

        8. Describe in detail the three most important reasons, in your opinion, why ALGOL 60 did not become a very widely used language.
Excessive flexibility hurt ALGOL60 since languages that are difficult to learn were not as well received as languages with a more rigid structure. Then the most important reason that ALGOL60 was not very widely used was because of a lack of support from IBM, who was at the time the preeminent company for using computer languages. Without some help from a large corporation, ALGOL60 did not have much of a chance, much like COBOL without the DoD.

        9. Why, in your opinion, did COBOL allow long identifiers when Fortran and ALGOL did not ?
COBOL required that managers without a background in programming should be able to read programs. This caused identifiers to be longer, making the language more English-like. Sebesta (2002, p. 57) states that “[ALGOL] identifiers were allowed to have any length, as opposed to FORTRAN’s restriction to six or fewer….” FORTRAN was also a much older language that was built during a time of very little memory and a focus on syntax “as close as possible to standard mathematical notation” leaving little room for long identifiers.


        10. Outline the major motivation of IBM in developing PL/I.
Until the time this new language was developed, all previous languages had focused on one particluar area of application, such as science, artificial intelligence, or business. PL/1 was not designed to be used in the same way. It was the first large-scale attempt to design a language that could be used in a variety of application areas.

No comments:

Post a Comment