Concept of Programming Language: Chapter 1

Lecturer: Mr. Tri Djoko Wahjono, Ir, M.Sc.

Review Question

1. Why is it useful for programmers to have some background in language design, eve though he/she may never actually design a programming language?

the reason why programmer should have a programming language design backgrounds is for the the programmer increase his/her capacity to express ideas, improving the programmer background for choosing appropriate language, increase the ability to learn new language, to have a better understanding of the significance of implementation, to better use of language that are already known by the programmer, and also overall advancement in computing.

3. What programming language has dominated scientific computing over
the past 50 years?

programming language that has dominated the scientific computing over this past 50 years is FORTRAN(FORmula TRANslator) programming language. FORTRAN has already been used since this past 50 years because FORTRAN is more efficient than the other language and also no subsequent language is significantly better than FORTRAN.

4. What programming language has dominated business applications over
the past 50 years?

COBOL(COmmon Business Oriented Language) is programming language that is use for business applications this past 50 years. COBOL language was the first successful high-level language for business. the initial version of COBOL was appeared in 1960. COBOL is used for producing elaborate reports, describing and storing decimal numbers and character data.

5. What programming language has dominated artificial intelligence over
the past 50 years?

Lisp is well known programming language used by artificial intelligence programmer over pas 50 years. List appeared in 1959 and become the first widely used programming language developed for AI application.

6. In what language is most of UNIX written?

The UNIX operating system is written almost entirely in C language which has made it relatively easy to port or move it into the different machines. Why in C language? it is a good choice to use C language for system programming because of its low level, execution efficient and also, C language does not burden the user with many safety restrictions. however, for some non-systems programmers, C is too dangerous to use on large, important software systems.

13. What does it mean for a program to be reliable?

program to be called reliable because it can performs to its specification under all conditions.

14. Why is type checking the parameters of a subprogram important?

Because in the original C language the type of an actual parameter in a function call was not checked to determine whether its type matched that of the corresponding formal parameter in the function. so it will depend on us as the programmer to check whether the data type used is correct or not. because for int and float data type for example, their output is the same is printing a number, but it has a different format when it comes to displaying the output in the computer.

15. What is aliasing?

aliasing is having two or more distinct names that can be used to access the same memory cell. In some languages, aliasing is used to overcome deficiencies in the language’s data abstraction facilities. Other languages greatly restrict aliasing to increase their reliability because mostly programming error comes from aliasing.

26. Which produces faster program execution, a compiler or a pure interpreter?

both compiler and pure interpreter has their own advantages and disadvantages. But, when it came into the speed of program execution, compiler has the faster execution than the pure interpreter because it has been proved that pure interpreter 10 to 100 times more slower because of its method in executing programs.

30. What are the advantages of using Borland JBuilder?

Borland JBuilder is a programming environment that provides an integrated compiler, editor, debugger, and file system for Java development, where all four are accessed through a graphical interface. JBuilder is a complex and powerful system for creating Java software.

Problem Set:

2. Who is said to be the first programmer in the human history? Use the internet for help.

Ada Lovelace,  daughter of Lord Byron, the famous English poet was the first known computer programmer. She began to write programs for Charles Babbage’s idea for a mechanical computer.Even the computer did not physically exist at this point, but the programs were built primarily to show what could be done by such a machine at the time called the Analytical Engine.

3. What are the disadvantages of multiple programming languages?

the disadvantages of having many programming languages is programmer become hard to decide which programming languages to master and also become lack of standards. there’s no one programming language that will become the base of all programming language.

4. In what way do the languages for scientific applications differ from the languages for business applications? Support your view.

scientific program and business application is obviously different. from the language used to interpret each of their formula until the logic. scientific uses more floating point integer in inputting the data, while business application more in using character set.  but basically, they have the same basic algorithm.

7. Java uses a semicolon(;) to mark the end of statements. what are the arguments for and against this design?

Java uses semicolon to mark the end of statements is because of simplicity and also to avoid error. the arguments is that programmers required to add semicolon in the end of  every statements or it can create a compilation error.

10. Make a comparative study of the cost of software and hardware.

The things that differentiate  between expensive hardware and expensive software is if it’s hardware that we’re talking about, then we’re talking about its components that makes that hardware expensive. and also the capability of the hardware handle instructions that is given by the software also become the consideration whether that hardware can be cheap or expensive. but, if it’s software, we’re not talking about the components anymore because, software only contains some instructions and these instructions that defines the price of the software. the more difficult the process in making the software, the more expensive it will be.

17. Some programming language–for example, SQL–use “=” to check the equality of two expressions, while C uses it to assign values to variable. which of these, in your opinion, is most natural and least likely to result in syntax error? support your answer.

I think the most natural and least likely to result in syntax error is the C language which use “=” to assign value and “==” to check the equality of two expressions. but actually, it’s not about which one is more natural and which one is not, the only things matter is the programmer has to adapt to the programming language. if the programmer already get used to use the syntax well in every programming language, then this problem won’t be a big matter.

Leave a comment