The follows is an introduction to the concepts of Programming Languages. Some of these concepts are the style of language, the identification of typical error when programming, etc.Lets begin by identifying different styles of programming languages.

Programming languages normally are divided in two categories:

The first category are languages that behave in a declarative way which means we tell the  computer what it is going to do.

Declarative language example: In Prolog, we provide a group of facts and rules, its up to the programming language to figure out the answer:

is_mother_of(maria, pedro). /* Maria is_mother_of Pedro */
is_mother_of(maria, lucia)./* Maria is_mother_of Lucia */

is_father_of(diego, pedro). /* Diego is_father_of Pedro */
is_father_of(manuel, lucia). /* Manuel is_father_of Lucia */

/* Person is_parent_of Child if Person is_mother_of Child */
is_parent_of(Person, Child):- is_mother_of(Person, Child).
is_parent_of(Person, Child):- is_father_of(Person, Child).

In this case, we have that a mother, Maria, who is mother of two children, Pedro and Lucia; however, both children have different fathers. Diego is father of Pedro while Manuel is father of Lucia.

Prolog is going to search for the answer for us base on there facts and rules. If we wish for more answers, it will search for the next one. We can keep asking Prolog to keep searching until there are no more answers to be found.

/* Prolog give us an answer */
?- is_parent_of(Maria, Child).
Maria = maria,
Child = pedro.

/* After Prolog give us an answer, we can ask Prolog to search for another answer using ';' */
?- is_parent_of(Maria, Child).
Maria = maria,
Child = pedro ;
Maria = maria,
Child = lucia. 

In the declarative languages, there exist subcategories of programming languages such as functional languages, dataflow languages, logic languages (also known as constraint-based languages), and template based languages.

Functional languages examples: Haskell, Lisp (Scheme), MI.

This languages are based on the use of recursive definitions of functions.

Dataflow languages examples: Val, Id.

These languages are defined as tokens (known as nodes) that are used for the flow of information. This kind of language let the user to work on  an inherently parallel model.

Logic (constraint-based) languages examples: Prolog, spreadsheets (such as Excel).

This kind of languages are designed so the programmer provide relationships and rules in such a way that the computer try to find the values that will satisfy them.

Template based languages example: XSLT.

The second category are imperative languages in which we tell the computer how to find the answer.

Imperative language example: In C, we must tell the language how to solve the problem.

/* This code tell the computer how to do the power of a number */
int PowerI(int pow, int number){
    int accumulator, counter;
    for (accumulator = 1, counter = 0; counter < pow; ++counter){
        accumulator = accumulator * number;
    return accumulator

In the imperative languages, there exist subcategories of programming languages such as scripting languages, object oriented languages, and Von Neumann languages which are based on statements (in honor to the creator of this language  John Von Neumman – .

Scripting languages examples: Bash, PHP, ASP, Python, Perl, Ruby.

This kind of languages let the programmer to create components and then combine them. The programmer can create a program and run it in real-time without compiling it, since each instruction is interpreted in real-time, letting the programmer to be able to change the program and witness the results instantaneously. However, there is a trade in speed.

Object Oriented languages examples: Java, C++, Small Talk, Eiffel.

This kind of languages work on the concepts of classes that are the blueprint to create objects. Later, the idea is to make these objects to interact between them.

Von Neumann languages examples: Fortran, Ada, C.

These languages are sequential in their process.

© 2010, Alejandro G. Carlstein Ramos Mejia. All rights reserved.


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.


Click to Insert Smiley

SmileBig SmileGrinLaughFrownBig FrownCryNeutralWinkKissRazzChicCoolAngryReally AngryConfusedQuestionThinkingPainShockYesNoLOLSillyBeautyLashesCuteShyBlushKissedIn LoveDroolGiggleSnickerHeh!SmirkWiltWeepIDKStruggleSide FrownDazedHypnotizedSweatEek!Roll EyesSarcasmDisdainSmugMoney MouthFoot in MouthShut MouthQuietShameBeat UpMeanEvil GrinGrit TeethShoutPissed OffReally PissedMad RazzDrunken RazzSickYawnSleepyDanceClapJumpHandshakeHigh FiveHug LeftHug RightKiss BlowKissingByeGo AwayCall MeOn the PhoneSecretMeetingWavingStopTime OutTalk to the HandLoserLyingDOH!Fingers CrossedWaitingSuspenseTremblePrayWorshipStarvingEatVictoryCurseAlienAngelClownCowboyCyclopsDevilDoctorFemale FighterMale FighterMohawkMusicNerdPartyPirateSkywalkerSnowmanSoldierVampireZombie KillerGhostSkeletonBunnyCatCat 2ChickChickenChicken 2CowCow 2DogDog 2DuckGoatHippoKoalaLionMonkeyMonkey 2MousePandaPigPig 2SheepSheep 2ReindeerSnailTigerTurtleBeerDrinkLiquorCoffeeCakePizzaWatermelonBowlPlateCanFemaleMaleHeartBroken HeartRoseDead RosePeaceYin YangUS FlagMoonStarSunCloudyRainThunderUmbrellaRainbowMusic NoteAirplaneCarIslandAnnouncebrbMailCellPhoneCameraFilmTVClockLampSearchCoinsComputerConsolePresentSoccerCloverPumpkinBombHammerKnifeHandcuffsPillPoopCigarette