The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > The Lounge > What's on Your Mind?
Google UNIX.COM


What's on Your Mind? Come inside and relax a while. Maybe play a few Video Arcade Games if you have free time.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to export/link Control_m with another programming languages pingosa UNIX for Advanced & Expert Users 1 06-11-2008 11:28 PM
Programming/Scripting Languages To Learn tjinr UNIX for Dummies Questions & Answers 1 07-24-2006 09:32 AM
Operating System and Programming languages jacx2 UNIX for Advanced & Expert Users 2 04-15-2002 08:59 AM
Shell scripting & programming languages aloysius1001 UNIX Desktop for Dummies Questions & Answers 1 02-18-2002 09:04 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 08-15-2008
Registered User
 

Join Date: Aug 2008
Location: Portugal
Posts: 213
Yeah, BASIC goes out of my time span. I'll try to find that article.
Reply With Quote
Forum Sponsor
  #9  
Old 08-15-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
http://www.u.arizona.edu/~rubinson/c...d_Harmful.html and see also Considered harmful - Wikipedia, the free encyclopedia
Reply With Quote
  #10  
Old 08-15-2008
Registered User
 

Join Date: Aug 2008
Location: Portugal
Posts: 213
I see! So in very simple terms, the letter does not criticize goto by itself. It criticizes programmers that used to over use goto on their programs because that could lead to a less structured and harder to maintain program. Although I can agree with that, I often see people criticizing goto even if it's only used in a structured basis like packing all errors and returns in the end portion of a function:
Code:
int
whatever()
{
        int error;

        do_stuff();
        keep_doing_stuff();
        if (!this_is_right())
        {
                error = EINVAL;
                goto err;
        }
        bla();
        if (this_is_wrong())
        {
                error = EPERM;
                goto err;
        }
        while (...)
        {
                stuff();
                if (stuff2())
                {
                        error = EFAULT;
                        goto err;
                }
        }
        ...
err:
        do_this();
        do_that();
        do_whatever();
        return -error;
}
Reply With Quote
  #11  
Old 08-15-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
The article was very influential for many years, and of course, contemporary Western culture and media can't remember the "unless used correctly" part of any criticism.
Reply With Quote
  #12  
Old 08-15-2008
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
Let's see, C, perl, ksh/bash/sh, and thats it! Rather a limited list. I have written code in assembly and LISP, but that was when I was in college, so its not really worth mentioning.

And I can actually feel my C skills falling off, the reason being that I haven't written anything worth mentioning in over a year! Plus perl/shell scripting makes you lazy...
Reply With Quote
  #13  
Old 08-15-2008
vbe vbe is offline
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 775
15 years ago I had to do some reverse engineering to rewrite in cobol85 a program written in cobol74...
I have heard a lot about NOT using goto like mad and spaggetti code, but never imagined what it could be like until that nightmare day where I was given thig challenge...
I almost went through depression after a week, and so had the help of the top analyst to play " Train " with me for a an extra week just to understand how the damn thing worked...

To give you an idea the goto started on the first line already, you had 400 lines of code
finishing with stop run on last line...

It took me 6 weeks to rewrite the program and almost 1200 lines of code.
But anyone able to read english can maintain what I wrote, and the reading of the first page you knew what and how it worked.
You just cant imagine how bad you feel when as a confirmed programmer you have been reading 3 pages of code not understanding whats going on and still have not seen the end.

OK I learned ( and forgot..) basic and basic clones PASCAL MANTISSE (Mainframe) COBOL
Reply With Quote
  #14  
Old 08-19-2008
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,200
Somehow I missed this thread, but let me see, when Era said Basic : was that :
Quote:
LET A = 10
LET B = 5
LET C = A + B
Was that the right syntax ? I think I've used it on Atari.... Boy, I started learning computers with this language, 17 years ago. Apparently, I don't remember anything now
Else, on the topic : perl and bash, this is what I use daily. I have some skills in reading and writing TCL/Expect code, and less Java, Python and C.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0