Wednesday, June 20, 2012

Little things about programming languages..........

        What is a programming language


             A programming language is a language to communicate with a computer or a machine.It can be use to create programs to control the behavior of a computer as we need. Programming languages are different from natural languages. Natural languages are used to communicate among people, but programming languages are used to communicate with computers.
      
   There are some basic things that every language have got in common.

Input      
     Take data from a keyboard or a file or some other device.

 Output
      Display data on the screen. Else send data to a file or to another device.

 Arithmetic
      Perform basic arithmetic operations.

Repetition
       Check some conditions and execute the appropriate sequence of statements under the                               conditions.

 Conditional execution
       Repeatedly perform some actions.

   There are thousands of programming languages. Some of the most popular languages are,


      

  • Java
  • C
  • Objective-C
  • C++
  • C#
  • (Visual) Basic
  • PHP
  • Python
  • Perl
  • Ruby
  • JavaScript


     In the past there were 3 language generations.

First generation

     These are the machine languages. It consists 1s and 0s only. So it is highly efficient and have the ability to  control the machine directly. But the programs were very hard to write and debug because it uses 1s and 0s.
                  But sometimes this first generation languages are used in 
  • Kernels 
  • Device drivers.


Second generation

                  These are called as assembly languages. These languages had the ability to add some numbers to get the total. The written programs can not use in another computer which means they were used for a specific machine and a microprocessor.


Third generation   

            These are called High level languages. Introduced in late 1950s. These languages are hardware independent. Programs have to be compiled (using a compiler or an interpreter). 

  • FORTRAN
  • COBOL
  • ALGOL    are the early 3GL languages.

        Modern languages like,
  • Java
  • Ada
  • Pascal 
  • C, C++, C#   are also 3GL languages. 
                 These 3GL languages are easy to use because the codes are close to the natural language.

New generations are shown below.

Fourth generation
          These are the current modern languages. They are very close (similar) to human languages. 



Fifth generation
           These are the future programming languages. Used for write programs for artificial intelligence.

 

No comments:

Post a Comment