1 / 9

Programming paradigms

Programming paradigms. Families of programming languages. Objected programming. Important language concepts Classes and objects Methods Encapsulation Private and protected Inheritance Polymorphism Some languages Java C++ C# Smalltalk. Declarative programming.

maitland
Download Presentation

Programming paradigms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming paradigms Families of programming languages Programming languages

  2. Objected programming • Important language concepts • Classes and objects • Methods • Encapsulation • Private and protected • Inheritance • Polymorphism • Some languages • Java • C++ • C# • Smalltalk Programming languages

  3. Declarative programming • Important language concepts • You say what you want, not how to do it. • An interpreter executes your “wish” • Some languages • SQL (Structured Query Language) • A DBMS (Database Management System) executes your SQL query. Programming languages

  4. Structured programming • Important language concepts • Procedures and functions • Selections statements • If…else, switch, etc. • Looping statements • While, for, etc. • Remarks • Opposed to unstructured programming • Lots of goto statements • Object-oriented programming languages has many elements borrowed from structured programming • Some languages • Pascal • C Programming languages

  5. Functional programming • Important language concepts • Lists • Programs are represented as lists • Functions • Recursion • Some languages • LISP • SML • Haskell Programming languages

  6. Logic programming • Important language concepts • Saying “what” instead of “how” • The inference machine knows “how” • Non-procedural • Programmer state “facts” • Programmer asks “questions” • Answered by the inference machine, using the facts • Some languages • Prolog Programming languages

  7. Programming language development • Programming languages are developed with inspiration from other programming languages. • Java was inspired by C++ and Smalltalk • C# was inspired by C++ and Java • Some languages are single paradigm • Meant to be used within a single paradigm • Some languages are multi paradigm • Meant to be used with 2 (or more) paradigms Programming languages

  8. Using programming languages outside the paradigm • Many programming languages can be used with more than a single paradigm • Example • Java can be used for • Object-oriented programming • Structured programming • Using only static constructs • Using a programming language outside its natural paradigm is awkward and error-prone • Find a programming language which suits the paradigm you like. Programming languages

  9. References • Wikipedia • Programming Paradigm http://en.wikipedia.org/wiki/Programming_paradigm • Bruce J. MacLennanPrinciples of Programming Languages, Holt Rinehart and Winston Programming languages

More Related