Criteria for evaluating languages - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Criteria for evaluating languages

Description:

COSC 3217 Programming Languages Dave Goforth ... COSC 3217 Programming Languages Dave Goforth. Aliasing. Example issues: C array referencing ... – PowerPoint PPT presentation

Number of Views:71
Avg rating:3.0/5.0
Slides: 16
Provided by: Gofo
Category:

less

Transcript and Presenter's Notes

Title: Criteria for evaluating languages


1
Criteria for evaluating languages
COSC 3217 Programming Languages Dave Goforth
  • Readability
  • Writability
  • Reliability

What about efficiency? What about
portability? What about cost?
2
Criteria 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
3
Influences on design of languages
COSC 3217 Programming Languages Dave Goforth
  • Hardware architecture - implementation and
    features
  • Applications - all-purpose?
  • Programming history and trends

4
COSC 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
5
COSC 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
6
COSC 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
7
COSC 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
8
COSC 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
9
COSC 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
10
COSC 3217 Programming Languages Dave Goforth
Abstraction chunking concepts
processes
E.g. operators, procedures/functions/methods,
parallel execution, events
data
E.g. objects and classes
11
COSC 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
12
COSC 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

13
COSC 3217 Programming Languages Dave Goforth
Exception handling
handling run-time errors
  • Example issues
  • reacting to bad data
  • reusable code (e.g. classes) used wrong

14
COSC 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

15
COSC 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
Write a Comment
User Comments (0)
About PowerShow.com