Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: java and goto instuction! amazing!

Reply
Thread Tools

Re: java and goto instuction! amazing!

 
 
Roedy Green
Guest
Posts: n/a
 
      08-23-2003
On Sat, 23 Aug 2003 12:36:48 +0330, "Amir Pashazadeh"
<> 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.
 
Reply With Quote
 
 
 
 
DiscoStu
Guest
Posts: n/a
 
      08-24-2003
> 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.


Hehehe that last bit is hysterical! Goto is obviously evil because
people have told me so for the longest time, I think someone with a
lab coat might even have proved it. I dont fully understand it so
therefore it must be evil and morally wrong. </sarcasm>

Lets all go fishing maybe
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Holy boop: goto for Java markspace Java 37 08-08-2012 12:23 PM
C++ and goto - can I? Uzytkownik C++ 1 04-06-2005 09:42 AM
GOTO this link EVERY DAY and HELP Feed the STARVING world. AK Computer Support 11 11-02-2003 06:48 PM
Re: java and goto instuction! amazing! E.C. Bäck Java 0 08-25-2003 02:31 AM
Re: java and goto instuction! amazing! Tor Iver Wilhelmsen Java 1 08-23-2003 11:08 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57