CS 541 Lecture -*- Outline -*- * Judging programming language designs goal: explore the questions: When is one language better than another? How to formalize that? ** Flon's axiom: can write bad programs in any language ------------------------------------------ FLON'S AXIOM (SIGPLAN Notices, 10(10):16-17, Oct 1975) "There does not now, nor will there ever, exist a programming language in which it is the least bit hard to write bad programs." ------------------------------------------ Q: Do you believe that? Q: What are some examples of good features that can be abused? Q: So what do we really care about? ** The paradox of judgement ------------------------------------------ THE PARADOX OF JUDGEMENT - all languages Turing-complete (Turing tarpit, Church equivalence) - all constructs can be abused - so how can one formally: compare languages, evaluate them, and make judgements? ------------------------------------------ Answers: evaluate them on specific tasks (what they can do) --> problem: how to formalize, what tasks? other metrics (e.g., principles) --> principles restrict the translations --> Felleisen's homomorphic translation approach *** MacLennan's principles of language design from his book "Principles of Programming Languages" ------------------------------------------ MACLENNAN'S PRINCIPLES OF LANGUAGE DESIGN (Principles of Programming Languages, Holt, Rinehart and Winston, 1987) Expressiveness: - abstraction, - automation, - information hiding, - allowing expression of security, - structure or readability, - meta-linguistic abstraction Efficiency: - programming time, - compile-time, - run-time, - object file size, - run-time space, - localized costs, - portability Aesthetics: - simplicity, - syntactic consistency, - orthogonality, - regularity, - zero-one-infinity, - terseness or syntactic abstraction ------------------------------------------ Q: how to formalize expressiveness and aesthetics?