Download presentation
Presentation is loading. Please wait.
Published byScarlett Marshall Modified over 9 years ago
1
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05
2
Introductions Course Overview Syllabus Programming Paradigms –Structured programming –Object-Oriented Programming –Functional Programming –Declarative Programming
3
Structured Programming (Imperative programming) Language closely tied to Von Neumann architecture. –Fortran, C, COBOL Break code into blocks or subroutines –Modular design –Explicit control of execution –Verb-oriented This piece of code takes an action
4
Object-Oriented Programming Provide more reuse and speed development –Simula, Smalltalk, C++, Objective C, Java Noun-oriented focus –How are system components represented? –What messages does an object understand? –How are objects related to each other? Key ideas: –Inheritance, polymorphism, information hiding
5
Functional Programming Programs can be recursively composed from smaller programs. –Language is extensible –Programs and data take the same form Lazy evaluation –Lisp, ML, Scheme Functions operate on data and return a result without side effects. Emphasis on the evaluation of expressions.
6
Declarative Programming Programs consist of a description of the relevant data or knowledge relations. –Prolog, SQL, Haskell Describe the result to be achieved, rather than how to achieve it. A built-in inference engine provides execution control. Programs focus on describing the relationship between objects in a domain. Programming as proving statements.
7
Different Tasks Require Different Approaches “If all you have is a hammer, then every problem looks like a nail.” Structured programming: focus on actions to take and flow control. –Operating systems, device drivers Object-oriented programming: focus on data structures –GUIs, simulations, toolkits Functional programming: focus on composition of small computational units. – Compilers, numerical analysis Declarative programming: focus on relations among data. –Databases, expert systems.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.