Title: Criteria for evaluating languages
1Criteria for evaluating languages
COSC 3217 Programming Languages Dave Goforth
- Readability
- Writability
- Reliability
What about efficiency? What about
portability? What about cost?
2Criteria for evaluating languages
COSC 3217 Programming Languages Dave Goforth
Readability
Characteristic Simplicity Orthogonality Control
structures Data types structures Syntax
design Support for abstraction Expressivity Type
checking Exception handling Restricted aliasing
Writability
Reliability
Table 1.1, p. 8, Sebesta
3Influences on design of languages
COSC 3217 Programming Languages Dave Goforth
- Hardware architecture - implementation and
features - Applications - all-purpose?
- Programming history and trends
4COSC 3217 Programming Languages Dave Goforth
Historical trends in programming
Hardware costs - execution efficiency process
focus
Software size and costs - development
efficiency data focus, software engineering
5COSC 3217 Programming Languages Dave Goforth
Simplicity
Simplicity - as few features as possible
e.g. Does a language need more than one iteration
construct? for while do/while
6COSC 3217 Programming Languages Dave Goforth
Orthogonality
Orthogonality a feature does one thing features
combine consistently
E.g. x x y vs. x y
E.g. x x 1 vs. x
7COSC 3217 Programming Languages Dave Goforth
Control structures
High level implementation of branching
E.g. GOTO (break, switch?)
E.g. top down structured design
E.g. subroutines, procedures, methods
8COSC 3217 Programming Languages Dave Goforth
Data structures
Primitive types and aggregate types
E.g. integer, float, boolean, character, BCD, ...
E.g. arrays, records-gtstructs-gtobjects
E.g. dynamic memory allocation
9COSC 3217 Programming Languages Dave Goforth
Syntax
Identifiers
E.g. Fortran default types, BASIC name lengths
Key words and structures
E.g. the block problem END vs ENDIF vs
Semantics in the syntax
E.g. machine code -gt assembler
E.g. unix
10COSC 3217 Programming Languages Dave Goforth
Abstraction chunking concepts
processes
E.g. operators, procedures/functions/methods,
parallel execution, events
data
E.g. objects and classes
11COSC 3217 Programming Languages Dave Goforth
Expressivity
frequently in conflict with simplicity /
orthogonality usually a tradeoff between
readability and writability
E.g. Does a language need more than one iteration
construct? (for, while, do/while)
E.g. APL
E.g. unix command style with parametric options
12COSC 3217 Programming Languages Dave Goforth
Type checking
- Example Issues
- implicit typing - eg Fortran
- dynamic typing - eg BASIC
- typecasting - assignment, parameter passing
- range checking on arrays
13COSC 3217 Programming Languages Dave Goforth
Exception handling
handling run-time errors
- Example issues
- reacting to bad data
- reusable code (e.g. classes) used wrong
14COSC 3217 Programming Languages Dave Goforth
Aliasing
multiple references to same memory
location required but dangerous feature
e.g. Fortran COMMON, java object parameters
- Example issues
- C array referencing
- concurrency in parallel execution
15COSC 3217 Programming Languages Dave Goforth
Factors in selecting a language
the costs and tradeoffs
Learning (readability writability) Coding
(writability, readability) Compiling Executing Qua
lity assurance (reliability) Maintenance
(readability, writability) Purchase ( cost)
Often a tradeoff
major