🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #459

Re: java and goto instuction! amazing!

#459
From: Roedy Green
Date: Sat, 23 Aug 2003 18:27
29 lines
2840 bytes
On Sat, 23 Aug 2003 12:36:48 +0330, "Amir Pashazadeh"
<pasha@abdnet.com> wrote or quoted :

>I decompiled a class file (using 3 different decompilers for accurancy), and
>every time I got the same source code, there is something amazing in it, it
>has "goto" instruction! how can it be?
>does JVM (as executor) supports "goto" instruction, but no standard compiler
>supports it yet? so a custom compiler can use it?

Yes.  You can't  go crazy with it.  The byte code verifier checks your
loops and jumps to make sure they don't do goofy things with the stack
depth.

A parser might find it more convenient for example to generate byte
code directly where the GOTO is permissible.  GoTo is wicked only in
human programming where the spaghetti you can create confuses fellow
programmers.  Every IF and LOOP is built in byte code of conditional
jumps and gotos.

Fear of GoTo can reach absurd levels.   I crossed horns with a boss
who had a strict no goto rule.  I explained to him that using a goto
in an Eiffel-like macro could save an average of 6 nesting depths per
method in his style of C code, but he rejected it on the same grounds
a Christian rejects gay marriage.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Technical Details
Message-ID: <m6cfkv8oo48ilc0tsu34ncrld3htq6khiv@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news3.calgary.shaw.ca.POSTED!not-for-mail
References: <bi77c4$5ja9n$1@ID-170682.news.uni-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,e1650d725c17806f
X-Google-Attributes: gid10a146,public
X-Google-Thread: 1089d0,e1650d725c17806f
X-Google-Attributes: gid1089d0,public
X-Google-Thread: 10bb9b,e1650d725c17806f
X-Google-Attributes: gid10bb9b,public
X-Google-Thread: f74b3,e1650d725c17806f
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2003-08-23 11:27:02 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news3.calgary.shaw.ca.POSTED!not-for-mail
X-Trace-PostClient-IP: 24.68.204.215
From: Roedy Green <roedy@mindprod.com>
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,comp.lang.java.machine,comp.lang.java.programmer
Subject: Re: java and goto instuction! amazing!
Organization: Canadian Mind Products
Reply-To: roedy@mindprod.com
Message-ID: <m6cfkv8oo48ilc0tsu34ncrld3htq6khiv@4ax.com>
References: <bi77c4$5ja9n$1@ID-170682.news.uni-berlin.de>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 29
Date: Sat, 23 Aug 2003 18:27:01 GMT
NNTP-Posting-Host: 24.64.223.206
X-Complaints-To: abuse@shaw.ca
X-Trace: news3.calgary.shaw.ca 1061663221 24.64.223.206 (Sat, 23 Aug 2003 12:27:01 MDT)
NNTP-Posting-Date: Sat, 23 Aug 2003 12:27:01 MDT