November 2008
  Sun Mon Tue Wed Thu Fri Sat  
              1  
  2 3 4 5 6 7 8  
  9 10 11 12 13 14 15  
  16 17 18 19 20 21 22  
  23 24 25 26 27 28 29  
  30              

Archives

November 2009 (2)
September 2009 (1)
July 2009 (2)
June 2009 (1)
March 2009 (3)
February 2009 (3)
January 2009 (3)
December 2008 (1)
November 2008 (1)
October 2008 (2)
September 2008 (7)
July 2008 (5)
June 2008 (1)
May 2008 (3)
April 2008 (4)
March 2008 (3)
February 2008 (3)
January 2008 (1)

November 24, 2008

Programming languages. First part.

In the history of computer science (both as a branch of mathematics and a way of doing things with a computer) there has always been several paradigm (for now : way of doing things) that were proven to have the same power (whatever is possible in a paradigm is possible in the other). In the practical world, programming requires a language to be expressed (as in non-computer world, ideas can be spoken in any language but needs can't be expressed without a language)(1). Languages (in programming) can be distinguished by there level (close to the hardware or up in the software sphere), there typing (the control they impose to the programmer), there verbosity (the concision it brings), there speed, the paradigm(s) implemented and many other thing.


The three dominant paradigms.

What is a paradigm ? It's an ensemble of principles, a way of doing thing and a general concept of methodology. It's rather difficult to explain it and very easy to show so here are some examples.

The first paradigm that appeared was the one called "imperative". It correspond to the well known Turing-machine and Babbage-programmable-computer (see Wikipedia for further information). Programs in imperative paradigm consist of a succession of order given to the machine.
Something like

  1. "read content of memory block 1"
  2. "add content of memory block 2"
  3. "put the result in memory block 3"
  4. "move the content of memory block 2 to memory block 1"
  5. "move the content of memory block 3 to memory block 2"

in a loop would be an implementation of Fibbonaci sequence computing.



The second paradigm to appear was the one called "functional". It derives from the Lambda-calculus discovered by Alonzo Church (see Wikipedia). It consist of a world where functions are standard values (just like numbers), the advantage is to be able to manipulate functions easily
eg : compose f g = (function x -> f (g (x))) is difficult to implement with such concision in non-functional programming style).

The other paradigm is the one called "Object Oriented". It appeared very recently and consist of a world were everything is an "object" of a certain "class" that "inherits" properties (such as "methods" and "variables") from other classes. It's not easy to use at first but after diving into it, it reveals unexpected strength.

It exists other programming paradigms but with fewer user (ie coder). The three presented above are ruling IT for now. However it is not to be excluded for a new contestant to appear.

(1) Some may argue that because of bootstrap problem, or according to some theory, or that there are exemples of non-linguistic communication (art ?)... The parenthesis made in introduction is just here to clarify ideas about programming and computer science in general.

Published at 21:00 / 0 comments / 83 visits
This post is public

( 1 post )

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...