Tuesday 14 October 2014

Assignment #2 (Concepts of Programming Languages Chapter 2 Problem Set)

Problem Set :

a=Answer
14. What are the arguments both for and against the idea of a typeless language? 
Arguments for the idea:

a. Flexibility, Brevity of syntax. It places stricter controls on what objects can receive and send, so making it easier to enforce design strategies throughout the application. When there are errors in types, there can be picked up during precompilation or in the IDE.

Arguments against the idea:

a. Without type checking, there is no means to verify the integrity of the data without executing the application. The syntax of typed languages can be viewed as overly long or verbose. Typed languages aren’t as flexible as untyped languages, as data structures need to be cast to the correct type before another object can receive them. It is also said that by using typed languages, the compiler spends less time dynamically typing objects and so executes faster. However, this point is a grey area and that the main area of argument is how these language differences play out when designing applications where more then a few people are working on the code.

15. Are there any logic programming languages other than Prolog? 

a. Yes, there are Fortran, C++, COBOL, Algol.

16. What is your opinion of the argument that languages that are too complex are too dangerous to use, and we should therefore keep all languages small and simple? 

a. Languages are too complex are too dangerous to use because of its meaning itself. Ambiguous languages can cause trouble and misunderstanding among people.    So, we must keep it small and simple to avoid ambiguation and misunderstanding.

17. Do you think language design by committee is a good idea? Support your opinion. 

a. Language design by committee definitely has its advantages, with varying points of view from different domains, different programming backgrounds, and even different language backgrounds all contributing for the better of the language like ALGOL 58. Knowledge of Plankalkul enhanced ALGOL 58 because members from Europe were familiar with the language. Improvements like variable length identifiers and array dimensions were improved upon previous languages. Even though many arguments and conflicts arise, like whether to use a comma (European) or a period (American) for a decimal point took place, it is beneficial to have options. I think history would show that the best use of committees would be after a language has been invented and accepted. At this point a better evaluation is possible and committee members would be better conditioned to make improvements than initial discoveries.

18. Languages continually evolve. What sort of restrictions do you think are appropriate for changes in programming languages? Compare your answers with the evolution of Fortran.
a. A good deal of restraint must be used in revising programming languages. The greatest danger is that the revision process will continually add new features, so that the language grows more and more complex. Compounding the problem is the reluctance, because of existing software, to remove obsolete features.

No comments:

Post a Comment