Evaluation of Major Programming Languages
Evaluation of Major Programming Languages
BCPL (Basic Combined Programming Language) which was used for writing compilers.
Then came the language 'B', called as 'B' because it was a subset of BCPL with added features. This language 'B' was created by Ken Thompson.
After language 'B', Dennis Ritchie came up with another language which was based upon 'B'. As in alphabets B is followed by C and hence, he called this language as 'C'.
Historical Background
2
Data structure is a data organization, management, and storage format that enables efficient access and modification
o He added Integer, floating point numeric type, arrays, records
The floating-point processor provides instructions to perform arithmetic, comparison, and other operations.
o Inclusion of mathematical expressions showing the current relationships between program variables.
o And perform syntax analysis on logic formulas that had parentheses and operators in six different levels of precedence
Parentheses
Exponents
Multiplication and Division (from left to right)
Addition and Subtraction (from left to right)
Pseudocode
o In early ages the computers were slow, unreliable, expensive, and having extremely small memories and difficult to program because of the lack of
supporting software.
o Among its problems is the use of numeric codes for specifying instructions
o For example, an ADD instruction might be specified by the code 14 rather than a connotative textual name
Index is database improves the speed of data retrieval operations on a table at the cost of additional writes and storage space to maintain the
o Fortran I:1957
o Fortran I: Included input/output formatting, Take the value in format and outputs in different
o
o Variable names of up to six characters (it had been just two in Fortran 0),
o User-defined subroutines, although they could not be separately compiled, the If selection statement, and the Do loop statement.
o Machine code produced by the compiler would be about half as efficient as what could be produced by hand
Fortan II
o Distributed in 1958
o Without independent compilation, any change in a program required that the entire program be recompiled .
o The capability of including precompiled versions of subprograms shortened the compilation process
Fortran IV
o IV becomes widely used in its time from 1960 – 1962 – It was Fortan 66
Fortran 95
o a new iteration construct, Forall, was added.
Performs assignment to array elements.
Fortran 2003
o Fortran 2003, added support for object-oriented programming, parameterized derived types, procedure pointers.
4
Fortan 2008
o Multithreading was added
o Some method was developed to allow computers to process symbolic data in linked lists
Symbolic data is an extension of standard data which are more complex than standard data
Linked list is a linear collection of data elements where the order is not given by physical placement in memory, Instead, each element points
to the next
o The concept of list processing was developed and implemented in a language called IPL (Information Processing Language)
o IPL language contribution in list processing was feasible and useful.
Language Overview and Data Structure
o Only two kinds of data structures: atoms and lists
o Atoms are symbols – complex data type
o The concept of storing symbolic information in linked lists is natural
o (A B C D) Nested list structures are also specified by parentheses.
o the fourth is the sublist (E (F G)), which has as its second element the sublist (F G).
o Internally, lists are stored as single-linked list, in which each node has two pointers and represents a list element.
Syntax of LISP
o LISP is very different from of imperative languages, because it is a functional programming language.
o Many researchers believe functional programming is a better approach to software development than procedural programming using imperative
languages
Functional programming is based on mathematical functions, LISP, Python, and JavaScript.
Two Descendants of LISP
o Scheme - Scheme is much smaller than Common Lisp
5
program
o Many other languages were being developed, all for specific machines
Early Design
o The syntax of the language should be as close as possible to standard mathematical notation, and programs written in it should be readable with little
explanation.
o It should be possible to use the language for the description of algorithms.
o Programs in the new language must be mechanically translatable into machine language.
ALGOL 58 Overview
o ALGOL 58 was a descendant of Fortran
o It generalized many of Fortran’s features and added several new constructs and concepts.
o ALGOL 58 formalized the concept of data type,
o Variables that were not floating-point required explicit declaration.
o Compound statements (begin ... end)
ALGOL 60 Overview
o Modified ALGOL 58 at 6-day meeting in Paris
o New features
o Block structure (local scope)
ALGOL introduced block structure, in which a program is composed of blocks that might contain both data and instructions and have the same
o Subprogram recursion
Recursion is a computer programming technique involving the use of a procedure, subroutine, function, or algorithm that calls itself in a step
having a termination condition so that successive repetitions are processed up to the critical step where the condition is met at which time
o Successes
6
o First language whose syntax was formally defined (BNF – Backus Naur Form -Used to define the syntax of programming language)
o Failure
o Reasons
o Similar to Fortran
Computerizing Business Records: COBOL
7
o Ever since COBOL was introduced very few languages have been introduced of COBOL type.
o Also, most of growth in business computing over the past 30 years has occurred in small businesses.
o In these businesses, very little software development has taken place. Instead, most of the software used is purchased as off-the-shelf packages for various
Describes the data that runtime module is to accept as input, to manipulate, to create, or to produce as output
o The Procedure Division.
o BASIC was very popular on microcomputers in the late 1970s and early 1980s.
o A strong resurgence in the use of BASIC began with the appearance of Visual Basic (Microsoft, 1991) in the early 1990s.
o Two mathematicians , John Kemeny and Thomas Kurtz originally designed in 1960.
o This language was designed for Liberal and arts students.
o Programs were typed in, compiled, and run, in a sort of batch-oriented way.
o The original BASIC had only 14 different statement types and a single data type—floating-point. The type was referred as “numbers”
Evaluation
o First Language which was used thru terminal connected to remote computer.
8
o The resurgence of BASIC in the 1990s was driven by the appearance of Visual BASIC (VB).
o VB became widely used in large part because it provided a simple way of building graphical user interfaces (GUIs), hence the name Visual BASIC.
o Perhaps the most important difference between VB and VB.NET is that VB.NET fully supports object-oriented programming.
o
Everything for Everybody: PL/I
o First Programming language for everyone.
o The initial design concept was that the new language would be an extension of Fortran IV – This idea was dropped immediately
Language Overview
o PL/I is the combined language of ALGOL 60, Fortran IV and COBOL 60
Evaluation
o Many new features were poorly designed
Two Early Dynamic Languages: APL and SNOBOL (String oriented Programming Language)
o Characterized by dynamic typing and dynamic storage allocation
Dynamically typed, checking is performed at run-time as opposed to at compile-time. In dynamic typing, types are associated with values not variables.
o Because before there is no way to know the amount of storage that will be needed
o Highly expressive (many operators, for both scalars and arrays of various dimensions)
7090. It had a simple syntax, only one datatype, the string, no functions, and no declarations and very little error control.
o Designed as a string manipulation language at Bell Labs by Farber, Griswold, and Polensky in 1964
o Slower than alternative languages (and thus no longer used for writing editors)
SIMULA 67
o SIMULA 67 is an extension of ALGOL 60
o To provide support for coroutines in SIMULA 67, the class construct was developed.
o One important result of orthogonality in ALGOL 68 was its inclusion of user defined data types
Data types that are defined by the user are known as user-defined data types.
For example; arrays, class, structure, union, Enumeration, pointer, etc. These data types hold more complexity than pre-defined data types
o The approach of ALGOL 68 to data structures was to provide a few related types and structures and allow the user to combine those primitives into a large number of different structures
o User-defined data types allow the user to design data abstractions that fit particular problems very closely
A dynamic array is one in which the declaration does not specify subscript bounds.
Some Early Descendants of the ALGOLs
o PASCAL
o From mid-1970s until the late 1990’s, it was the most widely used language for teaching programming
o C – 1972
o Though designed as a systems language, it has been used in many applications areas
o Developed, by Comerauer and Roussel (University of Aix-Marseille), with help from Kowalski (University of Edinburgh)
o Non-procedural
o Can be summarized as being an intelligent database system that uses an inferencing process to infer the truth of given queries
10
o Comparatively inefficient
o Huge design effort, involving hundreds of people, much money, and about eight years
Ada Evaluation
o Contributions
o Comments
o Competitive design
o Included all that was then known about software engineering and language design
o First compilers were very difficult; the first really usable compiler came nearly five years after the language design was completed
o Ada 95
o Ada 2005
o Popularity suffered because the DoD no longer requires its use but also because of popularity of C++
o First full implementation of an object-oriented language (data abstraction, inheritance, and dynamic binding)
In c#, Abstraction is a principle of object-oriented programming language (OOP), and it is used to hide the implementation details and display only essential features of the
object.
o Promoted OOP
o A large and complex language, in part because it supports both procedural and OO programming
explicitly.
An Imperative-Based Object-Oriented Language: Java
o Developed at Sun in the early 1990’s
o Based on C++
o Significantly simplified (does not include struct, union, enum, pointer arithmetic, and half of the assignment coercions of C++)
References are used to refer an existing variable in another name whereas pointers are used to store address of variable.
References cannot have a null value assigned but pointer can.
A reference variable can be referenced by pass by value whereas a pointer can be referenced but pass by reference.
o Includes support for applets and a form of concurrency
11
Java Evaluation
o Eliminated many unsafe features of C++
o Supports concurrency
o variable’s name
o Gained widespread use for CGI (Common Gateway Interface) programming on the Web
JavaScript
o Began at Netscape, but later became a joint venture of Netscape and Sun Microsystems
o A client-side HTML-embedded scripting language, often used to create dynamic HTML documents
o Purely interpreted
A language in which the implementations execute instructions directly without earlier compiling a program into machine language.
The compiled programs run faster than interpreted programs
o Related to Java only through similar syntax
PHP
o PHP: Hypertext Preprocessor, designed by Rasmus Lerdorf
o A server-side HTML-embedded scripting language, often used for form processing and database access through the Web
o Purely interpreted
Python
o An OO interpreted scripting language
o Most operators are implemented as methods, which can be redefined by user code
o Purely interpreted
o Includes pointers, delegates, properties, enumeration types, a limited kind of dynamic typing, and anonymous types
o Is evolving rapidly
o eXtensible Stylesheet Language Transformation (XSTL) transforms XML documents for display – data export with the help of tags
o JSP
o JSTL, a JSP library, includes programming constructs in the form of HTML elements
13