Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!noao!arizona!sunquest!terry From: terry@sunquest.UUCP (Terry Friedrichsen) Newsgroups: comp.os.minix Subject: No goto's please (was Re: Fixing 7K pipes again) Summary: ABSOLUTELY no goto's, please Message-ID: <455@sunquest.UUCP> Date: 2 Oct 89 18:09:50 GMT Organization: Sunquest Information Systems, Tucson Lines: 39 > tweten@gilmore.nas.nasa.gov (Dave Tweten) writes: > I hope you are merely overstating you case, Dr. Tanenbaum. I had > thought the "No gotos" religion had died, mercifully for the rest of > us. I used to make the same kinds of arguments. As an ex-FORTRANer, the GOTO was definitely on my list of things that a language "needed" to have. Then came the black day when the instructor of the computer science course I was in announced "There will be two programming projects in this course. The first WILL be written in C, and the second WILL be written in Pascal. AND NO GOTOs!". Now I thought that dictating the programming language was unreasonable enough in itself (I can do this in FORTRAN; leave me alone!), but to prohibit GOTOs was going beyond the bounds! But what could I do? I wrote about 20,000 lines of code for that course, with nary a goto in sight. By the end of the semester, I didn't even miss 'em. That was 10 years ago. Since then, I have written hundreds of thousands of lines of code in many complex logical situations (writing compilers, operating systems, and network implementations), and have NEVER used a single goto. My organic, pretzel-powered logic constructor now believes they don't exist, and thus never puts me in a position where I need or even want one. This is the wrong forum for this discussion, and it's been beaten to death in the forums for which it is appropriate, so I'll shut up. But I wanted to rebut and put this in front of those many programmers writing MINIX code: Dr. Tanenbaum is right: please, no gotos! Terry R. Friedrichsen TERRY@SDSC.EDU (alternate address; I live and work in Tucson) (Reply with flames or send them to the above address. All mail will be read, though not necessarily replied to.) Disclaimer: My company doesn't read my messages, so it can't possibly know what I'm saying!