ad

PROGRAMMING AND PROGRAMMING LANGUAGES





A programming language is a notational language used to communicate with the computer system. The process of giving detailed step-by-step instructions to the computer in a particular programming language to accomplish a well-defined task is ‘programming’. There are three main categories of programming language.

·         Machine language: consists of binary digits i.e. series OS 1s and 0s. This is the actual language understood by the computer.
·          
·         Low level language: this is but a symbolic language. Symbols and/or numeric codes are used to represent machine operations. A typical example is the Assembly language.
·          
·         High level language: this is a procedural language. It is similar to the human language. PASCAL, FORTRAN, BASIC, COBOL, are few examples of high level languages.



SYNTAX AND SEMANTICS OF A LANGUAGE

A natural language like English or French has its own syntax and associated semantics in the library of the language. Syntax can be said to be the laws governing the formation of valid statements in a language. As an analogy: consider the English statement a baby tells his mother, ‘mummy, I am hungry’. His mummy can fathom what her baby needs but the baby’s statement is incorrect in English language. We can infer that the statement made by the baby is syntactically wrong but semantically correct because his mother can make a reasonable deduction from the statement.


On the other hand, let us consider a statement like: ‘Baby, your Daddy kicked the bucket’. Because the baby does not yet have the knowledge of idiomatic expressions, the baby actually thinks his daddy uses his leg to kick the bucket and perhaps thinking the bucket starts rolling on the floor. For an adolescent with appreciable knowledge of idiomatic expressions, he knows at once that the baby’s father died. A statement like this is syntactically correct but semantically wrong as it is considered ambiguous because it has more than one meaning. Simply put, it does not have a unique meaning. It is undesirable to give a statement like this to a computer because of its ambiguity. So, one is safe to say learning a language (be it a natural or a programming language) is basically learning about the syntax and semantics of the language as well as its applications.

Post a Comment

0 Comments