Title: Criteria for evaluating languages
1Criteria for evaluating languages
COSC 3217 Programming Languages Dave Goforth
- Readability
- Writability
- Reliability
What about efficiency? What about portability?
2Criteria for evaluating languages
COSC 3217 Programming Languages Dave Goforth
Table 1.1, p. 9, Sebesta
Characteristic Simplicity/orthogonality Control
structures Data types structures Syntax
design Support for abstraction Expressivity Type
checking Exception handling Restricted aliasing
Writability
Reliability
Readability
3Influences on design of languages
COSC 3217 Programming Languages Dave Goforth
- Hardware architecture - implementation and
features - Applications - all-purpose?
- Programming history and trends
4Hardware / architecture
control structures
logic/ functional
5COSC 3217 Programming Languages Dave Goforth
Special purpose/general purpose
- Some examples
- business
- science
- mathematics
- learning
- children
- graphics
- operating systems
- Some examples
- PL/1
- Ada
- java
6COSC 3217 Programming Languages Dave Goforth
Historical trends in programming
Plankalkül
Hardware costs - execution efficiency process
focus
Software size and costs - development
efficiency data focus, software engineering
7COSC 3217 Programming Languages Dave Goforth
Simplicity/orthogonality
Simplicity - few features as possible
E.g. Does a language need more than one iteration
construct? (for, while, do/while)
Orthogonality - a feature does one thing
features combine consistently
E.g. x x y vs. x y
8COSC 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
9COSC 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
10COSC 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
11COSC 3217 Programming Languages Dave Goforth
Abstraction - chunking concepts
processes
E.g. operators, procedures/functions/methods
data
E.g. objects and classes
12COSC 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
13COSC 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
14COSC 3217 Programming Languages Dave Goforth
Exception handling - handling run-time errors
- Example issues
- reacting to bad data
- reusable code (e.g. classes) used wrong
15COSC 3217 Programming Languages Dave Goforth
Aliasing - multiple references to same memory
location
A required but dangerous feature e.g. Fortran
COMMON, java object parameters
- Example issues
- C array referencing
- concurrency in parallel execution
16Criteria for evaluating languages
COSC 3217 Programming Languages Dave Goforth
Table 1.1, p. 9, Sebesta
Characteristic Simplicity/orthogonality Control
structures Data types structures Syntax
design Support for abstraction Expressivity Type
checking Exception handling Restricted aliasing
Writability
Reliability
Readability
17COSC 3217 Programming Languages Dave Goforth
Factors in selecting a language the costs and
tradeoffs
major
Learning (readability writability) Coding
(writability, readability) Compiling Executing Qua
lity assurance (reliability) Maintenance
(readability, writability) Purchase ( cost)
Often a tradeoff