Re: VB6, VB2005, or Something Else?
- From: "Gary Nelson" <gn@xxxxxxxxxx>
- Date: Wed, 8 Mar 2006 21:07:56 -0000
Paul,
¤ > GoSub is the only one of those you mentioned that was part of the core
¤ > language and it can be easily
¤ > replaced
¤
¤ In your dreams.
¤
Try me. But if you're using several GoSubs in a Sub or Function then it's
spaghetti code and I'm not
interested. The ability to write bad code is not an excuse to use GoSub.
Try me?
The problem is that you (and many others, including the newbies at MS),
never understood how GoSub actually worked, and in what situations it was
superior to a Sub. Proper use of Gosub actually produces better organized
code, not spaghetti code. When you mention spaghetti code you are only
repeating a mantra you have heard repeated over and over again.
You're starting to sound like a C programmer. ;-)
Am I missing something here?
¤ > (and should be) - unless you wrote some really nasty GoSub code.
¤
¤ I've got a lot of really nasty GoSub code. It's really nasty, but it
works
¤ great.
¤
So in other words you can throw code maintenance out the window and you'll
need to provide GPS
tracking, a compass and a road map for anyone else to understand or modify
it.
Using GoSub doesn't imply throwing code maintenance out the window. Your
statement would make one think that now that Gosub no longer exists all
unmaintainable code will dissapear.
¤ > Not sure how you can say the majority of serious programmers used
GoSub.
¤ > In my experience it was
¤ > just the opposite.
¤
¤ Perhaps because a lot of serious programmers were using GoSub before
Subs &
¤ Functions existed. Also perhaps because GoSub is not the same as a Sub
or
¤ Function and for certain situations has definate advantages.
¤
I used it when Subs and Functions didn't exist. After that there was
little or no reason to use it -
certainly not in Visual Basic. If there is an advantage to using it in
place of a Sub or Function
I'd like to hear it.
Subs and Functions are for self-contained code.
Gosub is when the code is part of the sub or function, but needs to be
called repeatedly.
¤ By the way, I have a large ASP.NET application & a Web Service both done
in
¤ VB.Net and one of the things I miss the most is GoSub.
<Cringe>
Old habits die hard I guess. ;-)
It's like having a toolchest full of tools. It is possible to unscrew a
screw with a knife, but it is much nicer to use a screwdriver, and if I have
a variety of screwdrivers, better yet, to choose the proper size. What would
I do if the government banned the use of screwdrivers, or no one made them
anymore. I'd have to use a knife, but I would miss the screwdriver. It's not
a matter of habit, but of ease of use.
Gary
.
- Follow-Ups:
- Re: VB6, VB2005, or Something Else?
- From: Paul Clement
- Re: VB6, VB2005, or Something Else?
- References:
- Re: VB6, VB2005, or Something Else?
- From: Robin
- Re: VB6, VB2005, or Something Else?
- From: Ralph
- Re: VB6, VB2005, or Something Else?
- From: Andre Kaufmann
- Re: VB6, VB2005, or Something Else?
- From: Dan Barclay
- Re: VB6, VB2005, or Something Else?
- From: Paul Clement
- Re: VB6, VB2005, or Something Else?
- From: Robert Conley
- Re: VB6, VB2005, or Something Else?
- From: Paul Clement
- Re: VB6, VB2005, or Something Else?
- From: Gary Nelson
- Re: VB6, VB2005, or Something Else?
- From: Paul Clement
- Re: VB6, VB2005, or Something Else?
- Prev by Date: Re: Large Fonts
- Next by Date: Re: VB6, VB2005, or Something Else?
- Previous by thread: Re: VB6, VB2005, or Something Else?
- Next by thread: Re: VB6, VB2005, or Something Else?
- Index(es):
Relevant Pages
|
Loading