Monday, March 4, 2013

Answers of Concepts of Programming Languages Chapter 2

A. Review Questions
1.      Plankalkul was designed in 1945 and published in 1972.
2.      One of most interesting features of Zuse’s programs is the inclusion of mathematical expressions showing the current relationships between program variables.
3.      Plankalkul means program calculus.
4.      Two significant shortcomings in 1950’s that was overcome by Speedcoding were lacking of floating-point arithmetic operations and lacking of indexing of some sort to allow the convenient use of arrays.
5.      Words of UNIVAC I’s memory had 72 bits, grouped as 12 six-bit bytes.
6.      -
7.      John Backus invented the Speedcoding for IBM 701.
8.      Short code was developed by John Mauchly. It was called automatic programming because it simplified the programming process although spent more execution time.
9.      -
10.   The most significant feature added to Fortran I to get Fortran II is the independent compilation of subroutines.
11.   Character string handling, logical loop control statement and an if without an optional else clause were added to Fortran IV to get Fortran 77.
12.   Fortran 90 is the first version of Fortran which support dynamic variables.
13.   The first version of Fortran supporting character string handling is Fortran 77.
14.   Because they were concerned with natural language processing, when in 1950’s, there are only computers with computation based on numeric data in arrays.
15.   -
16.   Scheme is characterized by its small size and its exclusive use of static scoping, while Common LISP is characterized by its large and complex language, but has pure LISP basis and allowance to both static scoping and dynamic scoping.
17.   Scheme is mostly used for courses in functional programming.
18.   Association for Computing Machinery (ACM) and German acronym for Society for Applied Mathematics and Mechanics (GAMM) are the two companies which started to design ALGOL 60

B. Problem Set

1.      The significant feature on Fortran IV that will be a great influence on Java is the ability to pass subprograms as parameters to other subprograms. In Java, it is impossible to write stand-alone subprograms which cause it is hard to connect between subprograms.
2.      Short Code is capable of making multiplication without multiplication code needed, just put two operands side-by-side. Besides, it also uses pure interpreter to run itself. Comparing to a contemporary programmable hand calculator, surely Short Code will do the calculations slower than the calculator because Short Code uses interpreter. Short Code offers simpler syntax to do multiplication, however.
3.      -
4.      -
5.      I think to reach the efficiency of hand-coded program was quite hard at that time, because we only had computer with small memories in past. In computer with small memories, it was hard to create a fast compiler of hand-coded program, especially when the program is typed quite long, which obviously will consume the efficiency of time.
6.      -
7.      -
8.      -
9.      Because in that day, scientist often used the variable I,J,K to refer to their integer in their work in science. Moreover, Fortran was built for scientific application, therefore, in order to give more comforts to users (scientists), it allows those variables.
10.   The most important new developments of ALGOL 60 are:
a.      The concept of block structure was introduced
b.      Two different means of passing parameters to subprograms were allowed : pass by value and pass by name
c.      Procedures were allowed to be recursive
d.      Stack-dynamic arrays were allowed
11.   The assumption is correct because in that 1970’s, PL/I is widely used for both business and scientific applications although it suffers a lot in previous years and afterwards.
12.   A
13.   Because C was part of widely used UNIX operating system
14.   When we user typeless language, it requires us to be sharper in using the variables because all variable can contain different data types. At the same time, it also delivers simplicity of the code writing.
15.   Yes there are some nonprocedural languages other than Prolog, for example, Visual Basic, SQL.
16.   To some extent I agree to that argument, but to some extent, I also don’t agree. Too complex language is too hard to be written, that’s why there is higher possibility for a bug to occur. That’s why simple and small language is preferred. However, with complex language, it means other people are having hard time as well to understand the code which made the code to be safer to use.
17.   There is no language that can fulfills all requirements of its users, because in order to build that language, large number of memory is needed while today’s computer is not so advanced yet (although it is advancing). Furthermore, more and more needs of computer are appearing, which also means more and more requirements to be fulfilled by a language which never makes a language to be perfect.
18.   I think restriction in efficiency is important to language development. In any language development, building a more efficient language than before is crucial since it will consume less memory which will support the green computing as well. Furthermore, by having efficiency, it is lighter, so it will reach more users.
19.   -
20.   Features of Fortran :
a.      Supports dynamic arrays, records, pointers, multiple selection statement, modules
b.      String handling
c.      Capability of passing subprograms as parameters to other subprograms
d.      Forall construct iteration made
Features of C:
·        Supports dynamic pointers, multiple selection statement
·        String handling
·        Capability of passing subprograms as parameters to other subprograms
Features of BASIC:
·        Easy to learn
·        Small in size
·        Supports graphical user interface
21.   -
22.   -
23.   Lua certainly will attract more and more users to use it because it is now being used rapidly in gaming industry, which is very fast in development right now. Furthermore, it has great similarities with other famous languages, like Java, PHP, Scheme. Those similarities will make it to be more easy to be used from user with different background. In addition, although user who is going to use this language doesn’t have any background of programming language, this can be a good start point too because it has many same features with other languages.
24.   Because in today, scripting language, especially Javascript, is widely used in World Wide Web. As we can see today, internet has been a must need to every people to get information. To get advantage of this development, more and more scripting language is developed in order to fulfill user’s expectation, as well as to attract them to get more profits.
25.   Servlet is an instance of a Java class that resides on and is executed on a Web server system for form processing purpose and database access purpose. The execution of servlet is requested by a markup document displayed by Web browser. Then the request is processed by servlet container in the Web server. Lastly, the output of it is returned to the Web browser again. 

1 comment:

  1. will ini gw andre mengenai yang nomor 4, kau menemukan statement tersebut dari mana yah?
    dan juga brp banyak sih review question yang musti kita jawab?

    ReplyDelete