[CSUSB] >> [CNS] >> [Comp Sci Dept] >> [R J Botting] >> [CS320 Course Materials] >> [Sebesta] >> [Source]
[Index] [Schedule] [Syllabi] [Text] [Labs] [Projects] [Resources] [Search] [Grading]
Wed Jan 7 14:59:48 PST 2004

Introduction to the study of programming languages

This chapter introduces many new terms.  If you can not find their
meaning in the text then follow this link
	http://www.csci.csusb.edu/dick/cs320/lookup.php
and enter the word into the form to search my repository of terms
for CS320.

Outline

	1.1 Reasons why
	1.2 Programming Domains
	1.3 Language Evaluation Criteria
	1.4 Influences on Language Design
	1.5 Language Categories
	1.6 Language Design Tradeoffs
	1.7 Implementation Methods
	1.8 Programming Environments
	Review Questions
	Problem Set

Why study programming languages?

	Increased capacity to express ideas
	Improved background for choosing languages
	Increased ability to learn new languages
	Better understanding of implementations (and so better debugging skill)
	Increase ability to design new languages
	Overall advancements of Computing
	Others...
Which of the reasons  on pages 3..5 are most important to you?

Domains (section 1.2, pp5-7)

	Scientific applications
	Business Applications
	Artificial Intelligence
	Systems Programming
	Scripting: Shells, awk, tcl,...perl,...JavaScript...
	Special Purposes: CAD/CAM, Machine Tools, ...
  Missing:
	Web Programming

Which languages are linked to these domains?

Non-programming Domains

	Markup Languages: HTML, XML, ....
	Modeling Languages: UML
	Metalanguages: BNF,...
Which is your own application domain?

Criteria: What makes a language good or bad?

	The Key Criteria is COST.
		Cost (writing, maintaining, compiling, running, tools,...)
	Three Criteria in text contribute to COST.
		Readability
		Writability
		Reliability

	These depend on the features of the language:
		Simplicity, Orthogonality, structures for:control & data,
		Syntax, support for abstraction (data and control),
		type checking, exception handling, aliasing,
		etc etc

Make sure you keep the three criteria separate from the many features.

	The relationships between criteria and features is complex:
		Too little of a feature can be as bad as too much
		A feature that is good for one criteria is bad for another

	Which do think is most important:
		in Comp Science class
		in business
		in science
		in AI
		in Systems
		in a Missile?
	Are any criteria missing?

How do languages become what they are?

	Computer Architecture
		Did Kernighan & Ritchie's machine influence C?
		Evidence:  A=B[C++] is a PDP11 instruction.
	Methods
		http://www.csci.csusb.edu/dick/methods.html
		Did programming methods influence C++?
		Evidence
			Modules->multifile programs
			Multiple control structures were popular in the 70's
	*Inertia*
		It costs a lot to change... so languages tend to
		mutate rather than make big leaps.  However: All
		American National Standards have an 11 year review
		cycle so standard languages tend to catch up with
		10 years evolution in a year or two.

Success comes from:

	*Economics*
	*Advertising*

Categories

	Programming Languages
		Procedural
		Functional
		Object-Oreiented
		Rule-Based
	Markup Languages -- describe structure and appearance
	Meta-Languages -- describe other languages -- see chapter 3
	Modelling Languages -- describe problems and solutions.

Trade offs

	Give examples of opposing and desirable goals for C++.


How are languages implemented?

	Place of Programming Languages in Software systems.
		Form a shell around the OS that surrounds the machine

	Compiled	(Turbo Pascal, C, FORTRAN, COBOL, C++)
		Source->lexical->syntax->structure->code->link->Run
		           \_______\____        ____/
		                        Symbols

	Interpreted	(Basic,LISP, JavaScript,...)
		Source->statement->execute->next statement->execute->...
	Both!		(UCSD Pascal, Java,Prolog,Smalltalk,Scheme(?))

Programming Environments

	Collections of tools used to develop software
	Examples: UNIX, Smalltalk, Turbo<X>, Visual<X>.
	Problem of good tools with different user interfaces.