0% found this document useful (0 votes)
24 views13 pages

Evaluation of Major Programming Languages

Uploaded by

amc204849
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views13 pages

Evaluation of Major Programming Languages

Uploaded by

amc204849
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

1

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

 German scientist Konrad Zuse (Zuse’s Plankalkül)


o Built a series of complex computer from 1936 – 1945 but never published until 1972.

o Advanced data structures

 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 Included programs to sort arrays of numbers;

o Test the connectivity of a given graph;

o Carry out integer and floating-point operations

o Including square root;

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

o This caused the Poor Readability.

o A more serious problem is addressing

o Which makes program modification tedious and error prone

o There was no indexing

 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

index data structure


o Expression coding was tedious
 Short Code
o Short code language was developed by John Mauchly in 1949
o One of the first high level language
o Expressions were coded, left to right
o Short Code was not translated to machine code
o It was implemented with a pure interpreter
 An Interpreter directly executes instructions written in a programming
 While Compiler converts the source code into machine language which then becomes a program.
o Very slow execution
o Short Code interpretation was approximately 50 times slower than machine code.
 Speedcoding
o Speedcoding developed by Backus in 1954 for IBM 701
o Pseudo ops for arithmetic and math functions
o Conditional and unconditional branching
o Auto-increment registers for array access
o Slow!
o Only 700 words left for user program
 Design Process of FORTRAN
3

o Fortran 0: 1954 - not implemented

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

o Reduced the interest among users

 Fortan II
o Distributed in 1958

o Fixed some compilation feature.

o Independent compilation of subroutines.

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’s IV, 77, 90, 95, 2003, and 2008


o Fortran III was never released.

 Fortran IV
o IV becomes widely used in its time from 1960 – 1962 – It was Fortan 66

o It had explicit type declarations for variables.

 Option Explicit forces the developers to declare all variables.


o The capability of passing subprograms as parameters to other subprograms.
 Fortan 77
o Fortran IV was replaced by Fortran 77, which became the new standard in 1978
o Retained most of the features of Fortran IV and
o Added character string handling, logical loop control statements (if-then-else, Case statement, do while), and
o an If with an optional Else clause.
 Fortran 90
o Dramatically different from Fortran 77

o Dynamic arrays, records, pointers, a multiple selection statement, and modules.

o Official spelling of FORTRAN became Fortran

 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

 Functional Programming: LISP


o The beginning of AI – 1950

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 For example, the list (A (B C) D (E (F G))) is composed of four elements.

o The first is the atom A;

o the second is the sublist (B C);

o the third is the atom D;

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 Consider again the list


o (A B C D)
o When interpreted as data, it is a list of four elements.
o When viewed as code, it is the application of the function named A to the three parameters B, C, and D.
 Evaluation
o LISP dominated AI for quarter a century

o Inefficiency has been eliminated.

o LISP pioneered functional programming

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

 Scheme functions can be assigned to variables,


 passed as parameters, and
 Returned as the values of function applications
 can also be the elements of lists.
o Common LISP
 An effort to combine features of several dialects (a particular language) of LISP into a single language

 Large, complex, used in industry for some large applications

 The First Step Toward Sophistication: ALGOL 60


o Environment of development A developing environment with tools with which we can develop, debug, test, implement and debug an application or

program

o FORTRAN had (barely) arrived for IBM 70x

o Many other languages were being developed, all for specific machines

o No portable language; all were machine-dependent

o No universal language for communicating algorithms

o ALGOL 60 was the result of efforts to design a universal language

 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)

o Semicolon as a statement separator

o Assignment operator was :=


o if had an else-if clause

o No I/O - “would make it machine dependent”

 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

structure as an entire program.


 Block structure became a powerful tool for building large programs out of small components.
o Two parameter passing methods

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

the rest of each repetition is


o Stack-dynamic arrays

o Still no I/O and no string handling


 ALGOL 60 Evaluation

o Successes
6

o It was the standard way to publish algorithms for over 20 years

o All subsequent imperative languages are based on it

o First machine-independent language

o First language whose syntax was formally defined (BNF – Backus Naur Form -Used to define the syntax of programming language)

o Failure

o Never widely used, especially in U.S.

o Reasons

o Lack of I/O and the character set made programs non-portable

o Too flexible--hard to implement

o Similar to Fortran

o Formal syntax description

o Lack of support from IBM


 Computerizing Business Records: COBOL
7

o Ever since COBOL was introduced very few languages have been introduced of COBOL type.

o B/C COBOL met the needs of its application era.

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

general business applications.


 Historical Background
o The beginning of COBOL is somewhat similar to that of ALGOL 60
o Based on FLOW-MATIC
o FLOW-MATIC features
 Names up to 12 characters, with embedded hyphens
 English names for arithmetic operators (no arithmetic expressions)
 Data and code were completely separate
 The first word in every statement was a verb
 COBOL Design Process
 Design Goals
o Must look like simple English
o Must be easy to use, even if that means it will be less powerful
o Must broaden the base of computer users
o Must not be biased by current compiler problems
o Design committee members were all from computer manufacturers and DoD (Department of Defense) branches
o Design Problems: arithmetic expressions? subscripts? Fights among manufacturers
 COBOL has 4 division for programming
o The Identification Division.
 Which identifies the program a name
o The Environment Division. It’s optional

 It has two sections:


 The Configuration Section ·
 The Input-Output
o The Data Division.

 Describes the data that runtime module is to accept as input, to manipulate, to create, or to produce as output
o The Procedure Division.

 Consists of optional declaratives and


 procedures that contain sections, paragraphs, sentences and statements.
 Also contains the actual logic or operations to be performed to complete the task.
 It may contain declarative as well as non-declarative procedures.

 The Beginnings of Timesharing: BASIC


o Introduced in 1971

o BASIC was very popular on microcomputers in the late 1970s and early 1980s.

o It was easy for beginners to learn

o A strong resurgence in the use of BASIC began with the appearance of Visual Basic (Microsoft, 1991) in the early 1990s.

o BASIC (Beginner’s All-purpose Symbolic Instruction Code)

o Two mathematicians , John Kemeny and Thomas Kurtz originally designed in 1960.
o This language was designed for Liberal and arts students.

o Following were the goals of BASIC

 1. It must be easy for nonscience students to learn and use.


 2. It must be “pleasant and friendly.”
 3. It must provide fast turnaround for homework.
 4. It must allow free and private access.
 5. It must consider user time more important than computer time.
 Language Overview
o Original BASIC was not interactive.

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 Much of the BASIC design came from Fortran.

o Some minor influence from ALGOL 60

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 Visual Basic .NET, or just VB.NET, is one of Microsoft’s .NET languages.

o Although it is a significant departure from VB,

o it quickly displaced the older language.

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 IBM developed this PL/I in 1960.

o The users were divided into 2 groups. Science and business.

o Some were using Fortan and some COBOL

o The first version of PL/I, which was then named Fortran VI

o The initial design concept was that the new language would be an extension of Fortran IV – This idea was dropped immediately

o The language was named as NPL (New Programming Language) in 1964

o The name was changed to PL/I in 1965.

 Language Overview
o PL/I is the combined language of ALGOL 60, Fortran IV and COBOL 60

o The following features were introduced in PL/I

 Concurrently executing subprograms but poorly designed.


 Ability to detect and handle 23 different types of exceptions.
 Subprograms were allowed to be used recursively – A recursive program can call itself.
 Each recursive call creates a new instance of any objects declared in the subprogram, including parameters, variables, cursors, and exceptions.
9

 Evaluation
o Many new features were poorly designed

o Too large and too complex

 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 Variables are untyped

o A variable acquires a type when it is assigned a value

o Storage is allocated to a variable when it is assigned a value

o Because before there is no way to know the amount of storage that will be needed

 Origins and Characteristics of APL


o Designed as a hardware description language at IBM by Ken Iverson around 1960

o Highly expressive (many operators, for both scalars and arrays of various dimensions)

o Programs are very difficult to read

o Still in use; minimal changes

 SNOBL ("String Oriented and symbolic Language")


 The initial SNOBOL language was created as a tool to be used by its authors to work with the symbolic manipulation of polynomials (mathematical expression). It was written in assembly language for the IBM

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 Powerful operators for string pattern matching

o Slower than alternative languages (and thus no longer used for writing editors)

o Still used for certain text processing tasks

 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 Data abstraction began with it.

o Data abstraction provides the foundation for object-oriented programming.

 Orthogonal Design: ALGOL 68


o ALGOL 68 was one of its primary design criteria: orthogonality.

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

o ALGOL 68 introduced the dynamic arrays

 A dynamic array is one in which the declaration does not specify subscript bounds.
 Some Early Descendants of the ALGOLs
o PASCAL

o Developed by Wirth (a former member of the ALGOL 68 committee)

o Designed for teaching structured programming

o Small, simple, nothing really new

o Largest impact was on teaching programming

o From mid-1970s until the late 1990’s, it was the most widely used language for teaching programming

o C – 1972

o Designed for systems programming (at Bell Labs by Dennis Richie)

o Evolved primarily from BCLP and B, but also ALGOL 68

o Powerful set of operators, but poor type checking

o Initially spread through UNIX

o Though designed as a systems language, it has been used in many applications areas

o Programming Based on Logic: Prolog

o Developed, by Comerauer and Roussel (University of Aix-Marseille), with help from Kowalski (University of Edinburgh)

o Based on formal logic

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 Few applications areas

o History’s Largest Design Effort: Ada

o Huge design effort, involving hundreds of people, much money, and about eight years

o Sequence of requirements (1975-1978)

o Named Ada after Augusta Ada Byron, the first programmer

 Ada Evaluation
o Contributions

o Packages - support for data abstraction

o Exception handling - elaborate

o Generic program units

o Concurrency - through the tasking model

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 95 (began in 1988)

o Support for OOP through type derivation

o Better control mechanisms for shared data

o New concurrency features

o More flexible libraries

o Ada 2005

o Interfaces and synchronizing interfaces

o Popularity suffered because the DoD no longer requires its use but also because of popularity of C++

 Object-Oriented Programming: Smalltalk


o Developed at Xerox PARC, initially by Alan Kay, later by Adele Goldberg

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 Pioneered the graphical user interface design

o Promoted OOP

 Combining Imperative and Object-Oriented Programming: C++


o Developed at Bell Labs by Stroustrup in 1980

o Evolved from C and SIMULA 67

o Facilities for object-oriented programming, taken partially from SIMULA 67

o A large and complex language, in part because it supports both procedural and OO programming

o Rapidly grew in popularity, along with OOP

o ANSI standard approved in November 1997

o Microsoft’s version: MC++

o Properties, delegates, interfaces, no multiple inheritance

 Delegates in C# is just like pointers in C++


 Interface contains only the declaration of the members. The implementation of the interface’s members will be given by the class who implements the interface implicitly or

explicitly.
 An Imperative-Based Object-Oriented Language: Java
o Developed at Sun in the early 1990’s

o C and C++ were not satisfactory for embedded electronic devices

o Based on C++

o Significantly simplified (does not include struct, union, enum, pointer arithmetic, and half of the assignment coercions of C++)

o Supports only OOP

o Has references, but not pointers

 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 Libraries for applets, GUIs, database access

o Portable: Java Virtual Machine concept, JIT compilers

o Widely used for Web programming

o Use increased faster than any previous language

 Scripting Languages for the Web


 Perl
o Designed by Larry Wall—first released in 1987

o Variables are statically typed but implicitly declared

o Three distinctive namespaces, denoted by the first character of a

o variable’s name

o Powerful, but somewhat dangerous

o Gained widespread use for CGI (Common Gateway Interface) programming on the Web

o Also used for a replacement for UNIX system administration language

 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 Type checked but dynamically typed

o Used for CGI programming and form processing

o Dynamically typed, but type checked

o Supports lists, tuples, and hashes

 Tuples are used to store multiple items in a single variable.


 Ruby

o Designed in Japan by Yukihiro Matsumoto (a.k.a, “Matz”)

o Began as a replacement for Perl and Python

o A pure object-oriented scripting language

o All data are objects

o Most operators are implemented as methods, which can be redefined by user code

o Purely interpreted

 The Flagship .NET Language: C#


o Part of the .NET development platform (2000)

o Based on C++, Java, and Delphi

o Includes pointers, delegates, properties, enumeration types, a limited kind of dynamic typing, and anonymous types

 An enum is a special "class" that represents a group of constants (unchangeable/read-only variables)

 enum is the short of enumeration

o Is evolving rapidly

 Markup/Programming Hybrid Languages


o XSLT

o eXtensible Markup Language (XML): a metamarkup language

o eXtensible Stylesheet Language Transformation (XSTL) transforms XML documents for display – data export with the help of tags

o Programming constructs (e.g., looping)

o JSP

o Java Server Pages: a collection of technologies to support dynamic Web documents


12

o JSTL, a JSP library, includes programming constructs in the form of HTML elements
13

You might also like