-
Jul 11th, 2014, 01:49 PM
#1
GoTo is still alive!
Seems MS will never depreciate this ungodly statement.
I came across this under VS 2013:
http://msdn.microsoft.com/en-us/library/13940fs2.aspx
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 11th, 2014, 03:44 PM
#2
Re: GoTo is still alive!
If you love spaghetti and cheese then you 'got(o)a' love GoTo. And it brings back memory's when my first DOS programs was doing da goto. Also no one was born a high kick a$$ programmer so we, who happen to learn the primitive languages used Goto in the first place. So kudos for MS this time.
P.S. I believe the purpose of developing a programming language is not to remove programming features but to add, so if the feature is there from the beginning i believe it should be left alone(DAO is still there for example! And goto has it uses in some extreme situations anyhow). If they develop a new programming language then they can leave it out, if they dare.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 11th, 2014, 03:48 PM
#3
Re: GoTo is still alive!
Originally Posted by sapator
.... If they develop a new programming language then they can leave it out, if they dare.
Isn't C# technically "a new programming language"?
-
Jul 11th, 2014, 03:49 PM
#4
My usual boring signature: Nothing
-
Jul 11th, 2014, 03:51 PM
#5
Re: GoTo is still alive!
Originally Posted by passel
Isn't C# technically "a new programming language"?
They failed to leave it out in the first place, so...
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 11th, 2014, 03:53 PM
#6
Re: GoTo is still alive!
I remember goto and echo's on DOS, so i was actually programming f the feature (VS + PHP), YEAH!
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 11th, 2014, 04:02 PM
#7
Re: GoTo is still alive!
Sure we all started somewhere but just because something was developed decades ago doesnt mean we should keep it around in the new technology. If we did then BASICA and other ancient programming languages should be incorporated into .net 4.5. Heck lets include VBA in parallel and async programming lol.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 11th, 2014, 04:13 PM
#8
Re: GoTo is still alive!
I stand by my opinion. Just because it has a minimum use that does not make it ok to remove it. Imagine if ON THE SAME PROGRAMMING SUIT someone decided to deprecate the "while do" or "case" on the next upgrade.
If they create something new they can leave it out. So since C was the first thing they used for the framework, they should leave it(and watch everything fall apart) out because it's ancient? You wouldn't even have an on switch on a modern TV that way . (i know i know, I'm overdoing it but i had some booze tonight and I'm in "that" mood, bzzzz boozzzeee booobbb, erhehemmm , booozzz)..
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 11th, 2014, 05:44 PM
#9
Re: GoTo is still alive!
Well shame on your for not sharing! lol
Also, remember the breaking change in the .net framework? It can and has been done
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 12th, 2014, 12:29 PM
#10
Re: GoTo is still alive!
I haven't used a single GoTo statement since leaving QuickBasic approximately a decade ago(except in essential cases like VB6's primitive error handling mechanisms). Other control structures have rendered GoTos unnecessary. That being said, I wouldn't remove it. I don't think I would even consider a language a true programming language without a GoTo. It is such a staple in programming. Unconditional branching is one of the foundations of programming. Programs as we know them today cannot exist without this basic function and while high level languages don't have a need for them, it just feels wrong not to provide it. And although I may not need it, doesn't mean that somebody somewhere doesn't, even if whatever they're doing can be done better without it. Even MS used them in their programs. I have the MS source for a very early version of Word and they have a couple of GoTos in there.
-
Jul 12th, 2014, 01:42 PM
#11
Re: GoTo is still alive!
Nothing wrong with phasing out pieces of a language as new functionality renders them obsolete.
When was the last time you used Gosub in in VB?
Go (directly) to Jail. Do not pass Go(to). Do not collect 200 dollars.
Burn the land and boil the sea
You can't take the sky from me
~T
-
Jul 12th, 2014, 02:57 PM
#12
Re: GoTo is still alive!
You can use it like Van Halen used the red m&ms: If you look at some code and find GOTO's, it doesn't mean that the code is bad, but it sure should make you nervous about the rest of it.
My usual boring signature: Nothing
-
Jul 13th, 2014, 03:12 AM
#13
Re: GoTo is still alive!
We could use GOTO to 'obfuscate' our .Net apps. If hackers find those GOTOs then they might just leave our apps.
-
Jul 13th, 2014, 05:58 PM
#14
Re: GoTo is still alive!
GOTO created the computers so be respectful to the almighty GOTO, kneel and pray for the almighty command!!
P.S. I will write an MVC app this morning and try to incorporate GOTO in it's markup BS code. I think it's the best place to do it!
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 13th, 2014, 06:48 PM
#15
Re: GoTo is still alive!
Yeah, BS code would be a good place for GOTO.
My usual boring signature: Nothing
-
Jul 14th, 2014, 07:56 AM
#16
Lively Member
Re: GoTo is still alive!
Originally Posted by Shaggy Hiker
You can use it like Van Halen used the red m&ms: If you look at some code and find GOTO's, it doesn't mean that the code is bad, but it sure should make you nervous about the rest of it.
My last contract was with a company that purchased the source code to a package that was written in .NET in 2003 and contained quite a few gotos. Yes, it made me nervous. It was obviously written by programmers who were learning the .NET framework as they went along. Fortunately it was a very short-term job.
"Bones heal. Chicks dig scars. Pain is temporary. Glory is forever." - Robert Craig "Evel" Knievel
“Leave me alone, I know what I’m doing.” - Kimi Raikkonen
-
Jul 14th, 2014, 08:24 AM
#17
Re: GoTo is still alive!
In my prev job, using and debugging the huge 1mil lines ERP, i saw quite a few GOTO's . I wonder who put em there since all the engineers there were more experienced than i was (i beat the hell out of them is ASP.NET though) and the only candidate was a junior dev that i asked him if he did it(in a humorous conversation so he wouldn't be offended or afraid I'm gonna demand to get the boot) and he refused. So anyhow that proves my point of letting the language as is. If GOTO's were off then the ERP would be off for many days and the company would probably lose customers, hence money,hence people get fired and or the company would have been shut.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 14th, 2014, 10:27 AM
#18
Re: GoTo is still alive!
Like family we do not have a say in what we inherit.
The good news is that we can improve things and leave them better than we found them.
I usually start with documentation. A thousand foot overview of what the product is intended to do.
Next a document that breaks up the app into logical segments and discusses how each segment works.
Add or improve inline remarks to the code.
Finally I upgrade the product to current standards if it needs it including removing Goto statements, reducing and organizing code.
This may sound like a long process, but it really isn't as it forces you to understand the project in detail. It also helps others in your group (Current or future employees.) to come up to speed.
If a project was developed properly then these things should have been done to start with.
Personally on new jobs I like to start by interviewing the end users and managers if possible and take notes.
Often I find that people don't know exactly what they want,
but they really really know what they don't like. human nature to be sure.
If I skip these steps and wing it eventually the job bites me in the end.
If you are contracting the documents you create can with little effort be your bible.
Most importantly you know when you've satisfied the contract and avoid dreaded feature creep. Otherwise things can GOTO hell.
Last edited by Gruff; Jul 14th, 2014 at 10:32 AM.
Burn the land and boil the sea
You can't take the sky from me
~T
-
Jul 14th, 2014, 11:04 AM
#19
Re: GoTo is still alive!
I hope to adopt that if I ever get a chance to edit. I'm working on something where I am the domain expert. Since the area is pretty doggone narrow, I may be the greatest domain expert on this subject ever. At this point, I have around 700 pages (typed) of notes and descriptions for the program, which is nearing completion. A whole LOT of editing needs to be done, and it won't be fun. It could end up being a book....I wonder if I could make it entertaining....I think I'll call it Battle Programming 4.0 (I think 3.0 may have already come out, though I'm not sure about that).
My usual boring signature: Nothing
-
Jul 14th, 2014, 11:14 AM
#20
Re: GoTo is still alive!
You need to include some entertaining pictures too
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 14th, 2014, 11:54 AM
#21
Re: GoTo is still alive!
Interview question: "Can you give me five examples using the GOTO statement?"
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Jul 14th, 2014, 12:37 PM
#22
Re: GoTo is still alive!
Originally Posted by SJWhiteley
Interview question: "Can you give me five examples using the GOTO statement?"
goto hell
goto the end of the line
goto jail
goto the first door on the right
and never use goto
Please remember next time...elections matter!
-
Jul 14th, 2014, 12:53 PM
#23
Re: GoTo is still alive!
Originally Posted by TysonLPrice
goto hell
goto the end of the line
goto jail
goto the first door on the right
and never use goto
+1
-tg
-
Jul 14th, 2014, 01:03 PM
#24
Lively Member
"Bones heal. Chicks dig scars. Pain is temporary. Glory is forever." - Robert Craig "Evel" Knievel
“Leave me alone, I know what I’m doing.” - Kimi Raikkonen
-
Jul 14th, 2014, 03:40 PM
#25
Re: GoTo is still alive!
Originally Posted by homer13j
Police brutality!!!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 14th, 2014, 04:36 PM
#26
Re: GoTo is still alive!
I don't think you guys are grateful on what allowed you to be programmers in the first place. Again, kneel down and praise the almighty GOTO.
You will all be librarians if it weren't for the almighty GOTO.
GOTO ain't programming pollution,
GOTO will never die,
GOTO ain't programming pollution,
GOTO it will survive (yes it will).
So a thread about bringing back GOTO's ? They are not gone yet but we better warm up,right?
I think it deserves an... ARRRRGGGGGG! GOTO! ARRRGGGGG!!!!
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 14th, 2014, 06:18 PM
#27
Re: GoTo is still alive!
I just figured that since there has been so many negative thread about the death of this and bring back that etc that it may be nice to see that something so fundamental is still alive under the covers.
GoTo sounds more like an assebly language command like push, pop and mov
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 14th, 2014, 06:24 PM
#28
Re: GoTo is still alive!
Originally Posted by RobDog888
GoTo sounds more like an assebly language command like push, pop and mov[/color]
Actually it is the high level version of the assembly jmp instruction. It performs an unconditional jump. No language is Turing Complete without it. It forms the basis for a conditional jump which makes boolean logic possible in code. Its one of the most fundamental necessities for a programming language.
-
Jul 15th, 2014, 01:47 AM
#29
Re: GoTo is still alive!
Ahhh, finally. So it was a "we mock what we don't understand " situation, right?
When i was a young little sap programmer i started learning assembly. I could not get into it further as things were getting tight in order for me to finish my degree but i always wanted to find some spare time as i was highly intrigued with all the interrupts and registers and how you could literally own da computa a$$ and do whatever you felt like (never did find that time, except on summer vacations, that,err,well i have other things to do, more important than programming).I will study further some day as i believe, if i could choose a language to be my line of work, it would be assembly(but it's extremely hard if almost impossible to find a job for assembly). Also i was angry when microsoft named the VS assemblies as at first i though we could write assembly inside VS, like in C but you know, microsoft, always there to scr#w you up in ways you never though before (see W Millennium, MVC, W8).
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 15th, 2014, 07:40 AM
#30
Addicted Member
Re: GoTo is still alive!
On error GoTo errorHandle.
VBA need Try-Cash-Finally-End Try.
-
Jul 15th, 2014, 07:43 AM
#31
Re: GoTo is still alive!
Originally Posted by 3com
VBA need Try-Cash-Finally-End Try.
Yep,
Try it
Giveme my Cash back
Finally i got rid of it and got my cash back
End thinking of it.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 15th, 2014, 02:50 PM
#32
Re: GoTo is still alive!
I think that's a typo. I believe it is:
VBA need Try-Cash-Finally-Credit-End Try
My usual boring signature: Nothing
-
Jul 15th, 2014, 03:00 PM
#33
Re: GoTo is still alive!
It depends on your licence.. it may need to be:
Try-Catch-Release-Finally-End Try
-tg
-
Jul 15th, 2014, 03:55 PM
#34
-
Jul 15th, 2014, 04:25 PM
#35
Re: GoTo is still alive!
So again we managed to turn a perfectly good thread into a mess.
We were talking on how close and connected is the GOTO statement with God and suddenly VBA just pops in. What the?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 16th, 2014, 02:09 AM
#36
Re: GoTo is still alive!
"What is your opinion of the goto statement?" is a very useful question to ask when interviewing candidates for a programming job.
Needless to say I wouldn't be hiring the OP.
Has anyone seen the linux kernel lately? Probably the most stable article of advanced software in the world and yet it has more jumps than a clockwork frog.
I don't live here any more.
-
Jul 16th, 2014, 03:53 AM
#37
Re: GoTo is still alive!
Originally Posted by wossname
"What is your opinion of the goto statement?" is a very useful question to ask when interviewing candidates for a programming job.
The most useful question is "How much do you hate Micro$oft, please demonstrate on this rubber doll"
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 16th, 2014, 06:28 AM
#38
Re: GoTo is still alive!
Originally Posted by sapator
The most useful question is "How much do you hate Micro$oft, please demonstrate on this rubber doll"
+1 - Starting the day off with a laugh... good job.
-tg
-
Jul 16th, 2014, 07:27 AM
#39
Re: GoTo is still alive!
Show me, on the doll, where Microsoft abandoned VB6
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Jul 16th, 2014, 02:38 PM
#40
Re: GoTo is still alive!
Better than "Show me, on the doll, where Microsoft abused you."
If that is the case I would need a doll for every company with whom I did business.
Burn the land and boil the sea
You can't take the sky from me
~T
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|