[geeks] Comparison of Languages

William S. wilby98 at yahoo.com
Sun Feb 17 07:54:31 CST 2002


Some of you programmers may appreciate this.
I found it posted in a Fortran newsgroup.

-- 
Bill
Amsterdam, NL
Path: news1.xs4all.nl!newsfeed.xs4all.nl!xs4all!newshub.bart.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!solaris.cc.vt.edu!news.vt.edu!news.cc.ukans.edu!stl-feed.news.verio.net!newsreader.wustl.edu!unlnews.unl.edu!newsfeed.ksu.edu!nntp.ksu.edu!not-for-mail
From: mcalhoun at ksu.edu (Myron A Calhoun)
Newsgroups: comp.lang.fortran
Subject: Re: Write an application in fortran ? It is ridiculous !
Date: 15 Feb 2002 09:04:44 -0600
Organization: Kansas State University
Message-ID: <a4j82c$smn at unix2.cc.ksu.edu>
References: <20020210105048.17446.00000482 at mb-cr.aol.com>
  <4KDa8.52914$Pz4.277904 at rwcrnsc53>
NNTP-Posting-Host: unix2.cc.ksu.edu
X-Trace: cnn.cns.ksu.edu 1013785487 12424 129.130.12.4 (15 Feb 2002
  15:04:47 GMT)
X-Complaints-To: abuse at ksu.edu
NNTP-Posting-Date: Fri, 15 Feb 2002 15:04:47 +0000 (UTC)
X-Newsreader: NN version 6.5.0 #2 (NOV)
Xref: news1.xs4all.nl comp.lang.fortran:98042

>....[snip]....

>IMO, a higher level language should be the starting point for all beginners.

I always thought that C WAS a higher-level language.
Almost as high as ASM, in fact! 

>Now I hear they use C/C++ to teach people.  This is unfortunate.  My fiancee
>has taken 3 C classes as an introduction to programming.  All I can say is
>that the class has spent more time on confusing details of the language
>rather than thinking and writing logical code.

I taught (or at least I tried to teach!-) C to beginning programmers in
the last semester before I retired, and the above was also my conclusion.
Even though I tried to warn my students about the little "traps" waiting
throughout the C language, they fell into them, anyway.

That experience was one of the reasons I decided to retire:  my Department
Head asked me to teach that same class again the next semester!

Teaching C/C++ to entry-level programmers reminds me of the following,
which I've accumulated over many years.  All attributions have been
removed to protect the guilty.

LAYPERSON'S GUIDE TO PROGRAMMING LANGUAGES
------------------------------------------

Ada:  After correctly packaging your foot, you attempt to concurrently load
      the gun, pull the trigger, scream, and shoot yourself in the foot.
      When you try, however, you discover that your foot is of the wrong type.

Ada:  The Department of Defense shoots you in the foot
      after offering you a blindfold and a last cigarette.

Algol:  You shoot yourself in the gun.

Algol 68:  You must first remember a bullet is a projectile, and a gun is a
           projectile-launcher, then you find the manual's index has never
           heard of feet.  However when you specify your left toes in order
           from big to little, the right number of projectiles go in almost
           as fast as if you were using Fortran. 

APL:  You shoot yourself in the foot, then spend all day
      figuring out how to do it in fewer characters.

APL:  GN  NE  FT ^ BLT

Assembly:  You try to shoot yourself in the foot only to discover you
           must first reinvent the gun, the bullet, and your foot.

Assembly:  For those who like to load their own rounds before shooting
           themselves in the foot.

BASIC:  Shoot yourself in foot with water pistol.  On big systems,
        continue until entire lower body is waterlogged.

Interpreted BASIC:  You shoot yourself in the foot with a water pistol
                    until your foot is waterlogged and rots off.

Compiled BASIC:  You shoot yourself in the foot with
                 a BB using a SCUD missle launcher.

Visual BASIC:  You'll shoot yourself in the foot, but you'll
               have so much fun doing it that you don't care.

C:  You shoot yourself in the foot.

C++:  You accidentally create a dozen instances of yourself and shoot them all
      in the foot.  Providing emergency assistance is impossible since you
      can't tell which are bitwise copies and which are just pointing at
      others and saying, "That's me, over there."

CLIPPER:  You grab a bullet, get ready to insert it in the gun so that
          you can shoot yourself in the foot, and discover that the gun
          that the bullet fits has not yet been built, but should be
          arriving in the mail _REAL_SOON_NOW_.

CLP(R):  You spend all day patiently explaining what a
         foot looks like. You are shot in the hand.

COBOL:  USEing a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place
        ARM.HAND.FINGER on HANDGUN.TRIGGER and SQUEEZE, THEN return
        HANDGUN to HOLSTER.  CHECK whether shoelace needs to be retied.

Concurrent Euclid:  You shoot yourself in somebody else's foot.

csh:  After searching the manual until your foot falls
      asleep, you shoot the computer and switch to C.

dBase:  You buy a gun.  Bullets are only available from another company
        and are promised to work so you buy them.  Then you find out
        that the next version of the gun is the one that is scheduled
        to actually shoot bullets.  

DBase:  You squeeze the trigger, but the bullet moves so slowly that
        by the time your foot feels the pain you've forgotten why you
        shot yourself anyway.

DBase IV version 1.0: You pull the trigger, but it turns out that the gun
         was a poorly-designed granade and the whole building blows up.

DOS:  You can't get to either foot from here.

DOS BAT:  First you have to write the toenails out to a batch file which, when
          called, creates another batch file which repeatedly calls itself,
          each time appending toenails to the first batch file in such a way
          that when you then call the second batch file with the name of the
          first batch file as its argument, a temporary gun is constructed in
          a third batch file.  This can then be run to shoot yourself in the
          foot.

FORTH:  Foot in yourself shoot.  (shorter version: yourself foot shoot.)

FORTRAN:  You shoot yourself in each toe, iteratively, until you run out of
          toes, then you read in the next foot and repeat.  If you run out of
          bullets, you continue anyway because you have no exception-handling
          ability.

Haskell:  Never tried this one - there isn't enough RAM
          on my machine for the munitions factory.

HyperTalk:  Put the first bullet of the gun into the
            left of leg of you.  Answer the result.

LISP:  You shoot yourself in the appendage which holds the gun with which
       you shoot yourself in the appendage which holds the gun with which
       you shoot yourself in the appendage which holds the gun with which
       you shoot yourself in the appendage which holds  ...

Modula-2:  After realizing that you can't accomplish anything
           in this language, you shoot yourself in the head.

Modula-2:  You perform a shooting on what might be currently a foot with what
           might currently be a bullet shot by what might currently be a gun.

Motif:  You spend days writing a UIL description of your foot, the trajectory,
        the bullet, and the intricate scrollwork on the ivory handles of the
        gun.  When you finally get around to pulling the trigger, the gun jams.

Paradox:  Not only can you shoot yourself in the foot, your users can too.

Pascal:  The compiler won't let you shoot yourself in the foot.

Pascal:  Same as Modula-2 except the bullet is not of the
         right type for the gun and your hand is blown off.

Perl:  No problem, you use your chain-saw to cut off
       both legs and seek more interesting organs.

PL/1    After consuming all system resources including bullets, the
        data processing department doubles it's size, acquires
        two new mainframes and drops the original on your foot.

Prolog:  You tell your program you want to be shot in the foot.  The program
         figures out how to do it, but the syntax doesn't allow it to explain.

Prolog:  You attempt to shoot yourself in the foot, but the bullet,
         failing to find its mark, backtracks into the gun which
         then explodes in your face.

Revelation:  You'll be able to shoot yourself in the foot, just as
             soon as you figure out what all these bullets are for.

Smalltalk, Actor, et al.:  After playing with the graphics for 3 weeks, the
                           programming mangager shoots you in the head.

SNOBOL:  If you succeed, shoot yourself in the left foot.
         If you fail, shoot yourself in the right foot.

SNOBOL:  Grab your foot with your hand and rewrite your hand to be a bullet.

SQL:    You cut your foot off, send it out to a service bureau and when it
        returns, it has a hole in it, but will no longer fit the attachment
        at the end of your leg.

Unix:  % ls
       foot.c foot.h foot.o toe.c toe.o
       % rm * .o                  [Note extra space!]
       rm: .o: No such file or directory
       % ls
       %

Xbase:  Shooting yourself is no problem.  If you want to shoot
        yourself in the foot, you'll have to use Clipper.

370 JCL:  You send your foot down to MIS with a 4000-page document
          explaining how you want it to be shot.  Three years later,
          your foot comes back deep-fried.
---------
-- 
Five boxes preserve our freedoms:  soap, ballot, witness, jury, and cartridge
PhD EE (retired).   "Barbershop" tenor.   CDL(PTX).   W0PBV.   (785) 539-4448
NRA Life Member and Certified Instructor (Home Firearm Safety, Rifle, Pistol)



More information about the geeks mailing list