Chapter 2

Concepts of Programming Languages 10th Edition – Robert W. Sebesta
Page 127-131
Lecturer : Tri Djoko Wahjono

Review Questions (Randomly 23 of 69)

  1. What does Plankalkul mean? (Number 3)
    – Plankalkul means “plan kalkulus” which means “formal system for planning”.
  2. What hardware capability that first appeared in the IBM 704 computer strongly affected the evolution of programming languages ? Explain why. (Number 6)
    Its capabilities prompted the development of Fortran because it was able to support floating-point operations hardware.
  3. Under what environmental consideration was Fortran developed? Which is the first version of Fortran? (Number 9)
    The environment in which Fortran was developed was as follows : Computers had small memories and were slow and relatively unreliable, the primary use of computers was for scientific computations, there were no existing efficient and effective ways to program computers, and because of the high cost of computers compared to the cost of programmers. The first version of Fortran is Fortran 0.
  4. Which version of Fortran was the first to have any sort of dynamic variables? (Number 12)
    Fortran 90.
  5. What are the different data types and structures in Common LISP? (Number 15)
    Atoms and Lists.
  6. What two professional organizations together designed ALGOL 60? (Number 18)
    ACM and GAMM.
  7. What language was designed to describe the syntax of ALGOL 60? (Number 21)
    BNF Language.
  8. What data structure that appeared in COBOL originated with Plankalkul? (Number 24)
    Hierarchichal data structures (records).
  9. Why was BASIC an important language in the early 1980s? (Number 27)
    Its smaller dialects could be implemented on computers with very small memories.
  10. What features of SIMULA 67 are now important parts of some object-oriented languages? (Number 30)
    The important feature is Data abstraction.
  11. What language introduced the case statement? (Number 33)
    ALGOL-W language introduced the case statement.
  12. Why is Prolog called a non-procedural language? (Number 36)
    Because Prolog is concerned with the WHAT not the HOW. We have to specify what conditions the answer should satisfy, but not how to obtain it.
  13. What are the concurrent program units of Ada called? (Number 39)
    Tasks (using the rendezvous mechanism).
  14. What three concepts are the basis for object-oriented programming? (Number 42)
    Classes, Objects, and Methods.
  15. What programming paradigm that nearly all recently designed languages support is not supported by Go? (Number 45)
    Doesn’t support traditional object-oriented programming, as it has no form of inheritance.
  16. What do the Ada and COBOL languages have in common? (Number 48)
    Both were popularized by the Department of Defense.
  17. How does the typing system of PHP and JavaScript differ from that of Java? (Number 51)
    The dynamic nature of its strings and arrays, and its use of dynamic typing.
  18. For what application area is JavaScript most widely used? (Number 54)
    The application area is Web.
  19. What data types does Java support? (Number 57)
    Primitive data types and Reference/Object Data Types.
  20. How does Java provide storage deallocation? (Number 60)
    Java uses implicit storage deallocation for its objects, often called garbage collection.
  21. What deficiency of the switch statement of C is addressed with the changes made by C# to that statement? (Number 63)
    The complex structure within the switch body.
  22. What is the output of an XSLT processor? (Number 66)
    XML document.
  23. What are .jsp files executed? (Number 69)
    A servlet and is executed on a Web server system.

Problem Sets (Randomly 9 of 25)

  1. What features of Fortran IV do you think would have had the greatest influence on Java if the Java designers had been familiar with Fortran? (Number 1)
    I think it’s the ability to passing subprograms as parameters to other subprograms. The programmers are allowed to pass a class to another class as parameters and help them to integrate classes so the modularity in programming can be completed.
  2. Write a short history of the Fortran 0, Fortran I, Fortran II, and Fortran IV systems. (Number 3)
    – Fortran 0 was described in the IBM report titled “The IBM Mathematical FORmula TRANslating System : FORTRAN”. It was boldly stated that FORTRAN would provide the efficiency of hand-coded programs and the ease of programming of the interpretive pseudocode systems.
    – Fortran I was described in October 1956. It included input/output formatting, variable names of up to six characters, and user-defined subroutines. The early success of Fortran I was shown in results of a survey made in April 1958. Most of the code written for 704s was being written in Fortran, despite skepticism of most programming world a year earlier.
    – Fortran II compiler was distributed on 1958. It fixed many bugs in the Fortran I and added some significant features to the language, the most important being the independent compilation of subroutines. Few years after, it also added support for double precision and complex data types.
    – Fortran IV was developed in 1961 and released in 1962. It became the most used programming language of its time. IT contains many improvements from Fortran II, like explicit type declarations for variables, logical if construct and capability of passing subprograms as parameters to other subprograms.
  3. Which of the three original goals of the Fortran design committee, in your opinion, was most difficult to achieve at that time? (Number 5)
    Speed of the generated object code. Because at that time, hardware performance is not reliable, provided that there was still no language design that allows a language to fully use hardware capabilities to the efficient point, unless the design was done from scratch / uses an existing design that must be able to do simple functions as primitive syntaxes.
  4. LISP began as a pure functional language but gradually acquired more and more imperative features. Why? (Number 7)
    John McCarthy’s original interest in developing LISP was to meet the demand 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.
  5. Why, in your opinion, did Fortran allow names that began with I, J, K, L, M and N as implicitly integer type? (Number 9)
    – According to its history, Fortran designers chose those letters because scientists and engineers used letters as variable subscripts, usually i, j, and k and the designers threw three additional letters. In my opinion, what Fortran did was acceptable, thinking i j k was used in math for describing units in vectors and those additional letters were just additional so it does not matter much.
  6. Was IBM’s assumption, on which it based its decision to develop PL/I, correct, given the history of computers and language developments since 1964? (Number 11)
    The design of PL/I was based on the premise that any construct that was useful and could be implemented should be included, with insufficient concern about how a programmer could understand and make effective use of such a collection of constructs and features. But it turns out PL/I included a larger number of data structures, which made it harder to learn and difficult to implement, but it obviously could not provide an appropriate data structure for every need.
  7. What is the primary reason why C became more widely used than Fortran? (Number 13)
    Fortran can’t allocate new variables or space during execution time. This made recursive subprograms to run and made it difficult to implement a data structure that change shape dinamically. Kinds of program being built were simpler than recent. Thus Fortran are not able to accomodate the requirements of recent software developments. But, C is able to cover most of Fortran’s weakness on developing software that has advanced requirements. That is why C is more widely used.
  8. Are there any non-procedural programming languages other than Prolog? (Number 15)
    Yes. Such as : C++, COBOL, Algol, Fortran, SQL or Visual Basic.
  9. What are the limitations of language design by committee? Support your opinion. (Number 17)
    Committees tend to yield inconsistent designs. But I think the problem is that they won’t take risks. When one person is in charge he can take risks that a committee would never agree on. In everything else people do, reward is proportionate to risk. That’s why language design should be any different.
Advertisements
This entry was posted in KBP. Bookmark the permalink.

3 Responses to Chapter 2

  1. Sasha says:

    Im impressed, I must say. Really rarely do I encounter a blog thats both educative and entertaining, and let me tell you, you have hit the nail on the head. Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am very happy that I stumbled across this in my search for something relating to this.

  2. I know that writing a blog is a big problem but if someone writes such articles to be him with great respect.

  3. Latanya says:

    I think this is one of the most significant info for me.
    And i am glad reading your article. But want to remark on few general things, The web site style is ideal,
    the articles is really excellent : D. Good job, cheers

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s