Programming Paradigms

0

Written on Thursday, May 01, 2008 by Ennah, the comsci student

This is my 1st research in Principles of Programming. I just got 17/20 in this research because it was my 1st research ever. Actually, I thought the research was not graded so I really did not give my best to search. Anyway, still a good start.

Describe briefly the ff:

1. structured programming language
2. procedural programming language
3. functional programming language
4. object-oriented programming language
5. meta-languages

Give at least 2 examples each.

Answers

1. Structured Programming Language

Structured programming (sometimes known as modular programming) is a subset of procedural programming that enforces a logical structure on the program being written to make it more efficient and easier to understand and modify.

Structured programming frequently employs a top-down design model, in which developers map out the overall program structure into separate subsections. A defined function or set of similar functions is coded in a separate module or submodule, which means that code can be loaded into memory more efficiently and that modules can be reused in other programs. After a module has been tested individually, it is then integrated with other modules into the overall program structure.
Program flow follows a simple hierarchical model that employs looping constructs such as "for," "repeat," and "while." Use of the "Go To" statement is discouraged.

Examples: Ada, Pascal and dBASE

2. Procedural Programming Language

Procedural programming is the most natural way to tell a computer what to do, and the computer processor's own language which is the machine code, is procedural, so the translation of the procedural high-level language into machine code is straightforward and efficient. What is more, procedural programming has a built-in way of splitting big lists of instructions into smaller lists: the function.

A procedural program is written as a list of instructions, telling the computer, step-by-step, what to do: Open a file, read a number, multiply by 4, display something. Program units include the main or program block, subroutines, functions, procedures; file scoping; includes/modules; libraries.

Possible benefits:

* The ability to re-use the same code at different places in the program without copying it.

* An easier way to keep track of program flow than a collection of "GOTO" or "JUMP" statements (which can turn a large, complicated program into spaghetti code).

* The ability to be strongly modular or structured.

Examples: C, C++, Fortran, Pascal, Basic and Maple

3. Functional Programming Language

Functional programming languages emphasize rules and pattern-matching. While they appear non-intuitive to those who have only experienced procedural languages, they provide succinct and natural programming structures for those who gain some experience. Functional programming is particularly useful for mathematical work, where the notion of "function" is
already a well established concept.

Examples: Mathematica, APL, Erlang, Haskell, Lisp, ML and F#

4. Object Oriented Programming Language

Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs. It is based on several techniques, including encapsulation, modularity, polymorphism, and inheritance. It was not commonly used in mainstream software application development until the early 1990s. Many modern programming languages now support OOP.

Examples: Java and Visual Basic.Net

5. Meta-languages

In logic and linguistics, a metalanguage is a language used to make statements about other languages (object languages). Formal syntactic models for the description of grammar, e.g. generative grammar, are a type of metalanguage.

More broadly, it can refer to any terminology or language used to discuss language itself—a written grammar, for example, or a discussion about language use.

Example: HTML, XHTML, Backus-Naur form - earliest metalanguages

References:
http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci866374,00.html
http://amath.colorado.edu/computing/mmm/funcproc.html
http://en.wikipedia.org/wiki/Object-oriented_programming
http://wapedia.mobi/en/Functional_programming

If you enjoyed this post Subscribe to our feed

No Comment

Post a Comment