Nama : Aditya Isnugraha
Class : LM01
NIM : 1801419606
Assignment from Tri Djoko Wahjono
CHAPTER 2
- REVIEW QUESTION
11. What control flow statements were added to Fortran IV to get Fortran
77?
Answer : 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. Which version of Fortran was the first to have any sort of dynamic
variables?
Answer : Fortran 90 is the first version of Fortran which support dynamic variables.
13. Which version of Fortran was the first to have character string handling?
Answer : The first version of Fortran supporting character string handling is Fortran 77.
14. Why are linguists interested in artificial intelligence in the late 1950s?
Answer : 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. Where was LISP developed? By whom?
Answer : It was developed at MIT by John McCarthy.
- PROBLEM SET
11. 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?
Answer : 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. Describe, in your own words, the concept of orthogonality in programming language design.
Answer : It appears that orthogonality means the simplicity of programming constructs, or a minimal number of control and data structures in a language. Each additional construct increases the complexity, removing orthogonality.
13. What is the primary reason why PL/I became more widely used than ALGOL 68?
Answer :
- PL/I included the best of ALGOL 60 (recursion and block structure), FORTRAN IV (separate compilation with communication through global data), and COBOL (data structures, input/output, and report generating facilities), along with a few new constructs
- PL/I was the first language to have programs allowed to create concurrently executing tasks, the possibility to detect and handle 23 different types of exceptions, procedures allowed to be use recursively, pointers included as a data type, and reference to the cross sections of arrays
14. What are the arguments both for and against the idea of a typeless language?
Answer : Arguments for are obvious flexibility and ease of use. Without having to define a data type the programmer is free to develop code that is generated quickly and without much thought. Learning the language is much simpler because one doesn’t have to determine size or how the compiler will interpret the type later on, only what information must be included.
Arguments against include data insecurity, such as the assignment of a character type ‘A’ that could in fact be “defined” as a HEX value by the programmer. The compiler would also have trouble interpreting floating point values compared to integers. The resulting arithmetic would also cause serious problems; like adding 5 + “happy” and how they are interpreted different than perhaps the programmer intended.
15. Are there any logic programming languages other than Prolog?
Answer : Yes there are some non procedural languages other than Prolog, for example, Visual Basic, SQL.
-FORTRAN
-LISP
-ALGOL 60
Tidak ada komentar:
Posting Komentar