Presentation on theme: "Reasons to study concepts of PL"— Presentation transcript:
1 Reasons to study concepts of PL Increased capacity to express programming conceptsImproved background for choosing appropriate languagesIncreased ability to learn new languagesUnderstanding the significance of implementationIncreased ability to design new languagesOverall advancement of computing
2 Programming Domains Scientific applications Business applications Artificial intelligenceSystems programmingScripting languagesSpecial purpose languages
3 Language Evaluation Criteria 1.2. Writability- Factors:-3. ReliabilityReadabilityWritabilityReliabilityCostothers
4 Readability The most important criteria Factors: Overall simplicity Too many features is badMultiplicity of features is badOrthogonalityControl statementsData type and structuresSyntax considerations
5 Orthogonality Makes the language easy to learn and read Meaning is context independentSmall number of constructs for generating many structures.int, float, double, arrays and pointers ==> ?Few exceptions to rules: e.g. why can function return a struct, but not an array? Why are all parameters pass-by-value, except arrays?
6 Writability Simplicity and orthogonality Support for abstraction No duplicationAvoid too much complexity; so many constructs, most users don’t know what to useSupport for abstractionSubprograms, structuresExpressivityfor vs. while, ++ vs. + 1
7 Reliability Program should perform to specs under all conditions Type checking of parameters, out-of-range errorsException handlingAliasingGenerally bad, but can be useful for pass-by-referenceReadability and writabilityContorting the language to achieve an end can lead to errors.
8 Cost Programmer training Software creation Compilation speed Execution speedCompiler cost (Java vs. Pascal)Poor reliabilityMaintenance
9 Other Evaluation Criteria PortabilityGeneralityWell-definedness
10 Influences on language design Computer architectureWe use imperative languages, at least in part, because we use von Neumann machinesProgramming methodologies1950s and early 1960s: Simple applications; worry about machine efficiencyLate 1960s: People efficiency became important; readability, better control structuresLate 1970s: Data abstractionMiddle 1980s: Object-oriented programmingEarly 1990s: Code re-use and libraries
11 Language Categories Imperative Functional Logic Language Design Trade-offs1.Implementation MethodsImperativeFunctionalLogicObject-oriented (closely related to imperative)Mark-up languages (html) don’t describe computations, so don’t count
12 Language Design Tradeoffs Reliability versus cost of executionWritability versus readabilityE.g: APLFlexibility versus safetyE.g: PASCAL allows pointers and integers to be treated identically. Good for pointer calculations, but dangerous.
14 Compiled languages Translate high-level program to machine code Slow translationFast execution
15 Pure interpretation No translation Slow execution Becoming rare Though, see Python and Java!
16 Hybrid implementation systems Small translation costMedium execution speed
17 Programming Environments The collection of tools used in software developmentUNIXAn old operating system and tool collectionBorland C++A PC environment for C and C++Smalltalk & LispA language processor/environmentMicrosoft Visual C++A large, complex visual environment