Copyright R.A. van Engelen, FSU Department of Computer Science, 2000

 

Programming Languages

Syllabus
  • Prerequisites

  • Some familiarity with a contemporary programming language
  • Textbook

  • Michael L. Scott Programming Language Pragmatics
  • Other material

  • class notes and handouts
  • Web site

  • Home page http://www.cs.fsu.edu/~engelen/courses/COP4020 and UniversalClass.com http://home.universalclass.com/technology/viewclasses.htm
  • Class times

  • MWF: 1:25 - 2:15 pm
  • Class location

  • 101 J. Love Building
  • Recitations

  • Wed; sec 1 = 2:30-3:20 pm room 103 Love, sec 2 = 3:35-4:50 pm room 103 Love, sec 3 = 6:45-8:00 pm room 301 Love, sec 4 = 8:15-9:30 pm room 301 Love
Contact
  • Instructor

  • Dr. Robert van Engelen
  • Email

  • engelen@cs.fsu.edu
  • Phone

  • 850 644 9661
Note: the on-line syllabus allows you to access more detailed information about the course

 

Objectives

  • Improve the background for choosing appropriate programming languages for certain classes of programming problems
  • Be able in principle to program in an imperative (or procedural), an object-oriented, a functional, and a logical programming language
  • Understand the significance of an implementation of a programming language in a compiler or interpreter
  • Increase the ability to learn new programming languages
  • Increase the capacity to express programming concepts and choose among alternative ways to express things
  • Simulate useful features in languages that lack them
  • Be able in principle to design a new programming language
  • Make good use of debuggers and related tools

 

Programming Language History

  • 1940s: The first electronic computers were monstrous contraptions programmed in machine language
    • Code not reusable or relocatableDefine this term (= displacable in memory)
  • Assembly languages were invented to allow operations to be expressed with mnemonic abbraviations
    • Enables larger, reusable, and relocatableDefine this term programs
    • Actual machine code produced by assemblerDefine this term
    • Early assembler: one-to-one correspondance between assembly and machine instructions
    • Later: macro expansion into multiple machine instructions
  • Mid 1950s: development of FortranDefine this term, the first arguably higher-level language
    • Finally, programs could be developed that were machine-independent (is this problem really solved by modern languages? JavaDefine this term is arguably machine independent)
    • Main computing activity was numerical computation
    • Other high-level languages soon followed (CobolDefine this term, Algol 58, LispDefine this term)
  • 1980s: Object-oriented programmingDefine this term
    • Important innovation in software development
    • The concept of data type abstractionDefine this term is inherited from Simula 67Define this term, a language for discrete event simulation with classesDefine this term but no inheritanceDefine this term

 

Programming Language Genealogy

Note: http://www.cs.rochester.edu/u/scott/pragmatics/A.html is a link to a resource of programming languages

 

Selected Overview of Programming Languages

  • FortranDefine this term (I, II, IV, 77)
    • Dramatic impact on computing in early days
    • Mainly used for numerical computation
    • No recursion
    • Limited data types (no records and no pointers)
    • Limited type checking
    • Very good compilers are available today
  • FortranDefine this term (90, 95, HPF)
    • Major revisions, eg. recursion, pointers, and records added
    • New control constructs (eg. while loop)
    • Extensive set of array operations
    • HPF (High-Performance Fortran) includes parallel constructs
  • LispDefine this term
    • The original functional language developed by McCarthy as a realization of an abstract machine: Church's lambda calculusDefine this term
    • Many dialects, including Common Lisp and SchemeDefine this term
    • Very powerful for symbolic computation using lists (eg. for artificial intelligence)
    • Implicit memory management (allocate/deallocate) by "garbage collection"Define this term
    • Influenced functional programming languages (ML, Miranda, HaskellDefine this term)

 

Selected Overview of Programming Languages

  • Algol 60Define this term
    • The original block-structured language (local variable scopes)
    • First use of Backus-Naur Form (BNF)Define this term to formally define grammar
    • All subsequent imperative programming languages are based on it
    • No I/O and no character set, not widely used in US
  • Algol 68Define this term
    • Large and relatively complex
    • Strong influence on PascalDefine this term, CDefine this term, AdaDefine this term
  • CobolDefine this term
    • Originally developed by Department of Defense
    • Intended for business data processing
    • Extensive numerical formatting features and decimal number storage
    • Introduced the concept of records and nested selection statements
  • BasicDefine this term
    • Intended for interactive use (intepreted)
    • Goals: easy to learn and use for non-science students
    • Visual Basic is a popular dialect
  • PL/IDefine this term
    • Designed by IBM
    • First exception handling
    • First pointer data type
    • Poorly designed, too large, too complex

 

Selected Overview of Programming Languages

  • PascalDefine this term
    • Designed for teaching "structured programming"Define this term
    • Small and simple
  • Simula 67Define this term
    • Primarily designed for discrete-event simulation
    • Based on Algol 60
    • Introduced concept of coroutinesDefine this term (co-executing routines, kind of communicating threads)
    • Introduced the classDefine this term concept for data abstraction
  • AdaDefine this term
    • Originally intended to be the standard language for all software commissioned by the Department of Defense
    • Very large
    • Elaborate support for packages, exception handling, generic program units, concurrency
  • Ada 95Define this term
    • Support for object-oriented programmingDefine this term
    • New concurrency features

 

Selected Overview of Programming Languages

  • Smalltalk-80Define this term
    • Developed by XEROX PARC
    • First full implementation of an object-oriented language
    • First design and use of window-based graphical user interfaces (GUIs)
  • APLDefine this term
    • Intended for interactive use ("throw-away" programming)
    • Highly expressive functional language makes programs short, but hard to read
    • Many array operations
  • PrologDefine this term
    • The most widely used logic programming language
    • Non-procedural (declarative: states what you want, not how to get it)
    • Based on formal logic
  • HaskellDefine this term
    • The leading purely functional language, based on Miranda

 

Selected Overview of Programming Languages

  • CDefine this term
    • One of the most successful programming languages
    • Designed for systems programming
    • Powerful set of operators, but weak type checking and no dynamic semantic checks
  • C++Define this term
    • The most successful of several object-oriented successors of C
    • Evolved from C and Simula 67
    • Large and complex, because it supports both procedural and object-oriented programming
  • JavaDefine this term
    • Developed by Sun
    • Based on C++, but significantly simplified
    • Supports only object-oriented programmingDefine this term
    • Safe languageDefine this term (eg. no pointers but references, strongly typedDefine this term, and implicit garbage collectionDefine this term)
    • Truly machine-independent (?)
Note: More about Java

 

So Why is it That There are so Many Programming Languages?

  • Evolution
    • This course should give you some insight in what constitutes a good or a bad programming construct for language design. Appendix B of the textbook has a long list of historical mistakes
    • Early 70s: "structured programming"Define this term in which goto-based control flow was replaced by high-level constructs such as while loops and case statements
    • Late 80s: nested block structure gave way to object-oriented structures
  • Special Purposes
    • Many languages were designed for a specific problem domain. For example
      • Scientific applications
      • Business applications
      • Artificial intelligence
      • Systems programming
  • Personal Preference
    • The strength and variety of personal preference makes it unlikely that anyone will ever develop a univerally acceptable programming language

 

What Makes a Programming Language Successful?

  • Expressive Power
    • All languages are equally powerful in technical sense
    • Language features have a huge impact on the programmer's ability to read, write, maintain, and analyze programs
    • Abstraction facilities enhance expressive power
  • Ease of Use for Novice
    • Low learning curve and often interpreted, eg. Basic and Logo
  • Ease of Implementation
    • Runs on virtually everything, eg. Basic, Pascal, and Java
    • Freely available
  • Excellent Compilers
    • Fortran has extremely good compilers (because it lacks recursion and pointers) and is therefore popular for numerical processing
    • Supporting tools to help the programmer manage very large projects, eg. Visual C++
  • Economics, Patronage, and Inertia
    • Powerful sponsor: Cobol, PL/I, Ada
    • Some languages remain widely used long after "better" alternatives because of a huge base of installed software and programmer experience

 

Classification of Programming Languages

  • DeclarativeDefine this term ("what the computer is to do")
    • FunctionalDefine this term (eg. Lisp, Scheme, ML, Miranda, Haskell)
    • DataflowDefine this term
    • LogicDefine this term (eg. Prolog, Excel)
  • ImperativeDefine this term ("how the computer should do it")
    • ProceduralDefine this term or "von Neumann" (eg. Fortran, Pascal, Basic, C)
    • Object-orientedDefine this term (eg. Smalltalk-80, C++, Java)