Nama: Stefanus Eduard Adrian
NIM: 1801382963
NIM: 1801382963
Review Questions
UNIX
is mostly written in C.
User-defined
operator overloading wil make an operator has more than one meaning. Maybe it
can reduce the process needed but it will make the computer confused to read or
compute our program because one operator can have more than one meaning so
user-defined operator overloading can harm the readability of a program.
One
example of a lack of orthogonality in the design of C is in structured data
type (record and array). Record can be returned from function but array can’t
be returned.
Language
that used orthogonality as a primary design criterion is ALGOL 68
Problem Set
6. What common programming language statement, in your opinion, is most detrimental to readability ?
I’ve just learned one programming language,
that is C. So far I can’t find any detrimental to readability in C.
The
argument for this design is the ease and simplicity to mark the end of all
compound statements. The mark is easy enough for us to remember. The argument
against this design is sometimes the right brace can make us confused because
we don’t know the matching left brace to the right brace we use to end of all
compound statements. So sometimes we can have more or less either left or right
braces.
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
of this design decision:
-It can
make the program to read the code more precisely
-It can
make the program code to be seen more easily
-It makes
the languages looks more professional
The cons of
this design decision:
-If we
miswrite the uppercase or lowercase letters, it can make our code not running
successfully
-It can make our program code somehow more
complex9. Explain the different aspects of the cost of a programming language.
a. The cost to write programs in that language.
If it’s hard to write programs in that language, it will increase the cost to
write programs in that language.
b. The cost
to train programmers to use the language. The harder the language is, the more
cost needed to pay the trainer.
c. The cost
for the language implementation system. A reliable interpreter system should be
available after a language is released.
d. The cost to maintain the programs. It
includes the cost to correct and modify the programs to fix bugs or add new functionality.10. What are the arguments for writing efficient programs even though hardware is relatively inexpensive ?
Bonus Question