Re: VB6, VB2005, or Something Else?



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


.



Relevant Pages

  • Re: VB6, VB2005, or Something Else?
    ... By the way, the preformance of Gosub in PCode was quite good, it ... ¤ ... I'm not complaining about the necessary changes, ... that Microsoft intentionally and unnecessarily made it more difficult. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6, VB2005, or Something Else?
    ... ¤> ¤ vFred. ... ¤> No one was really complaining about the removal of GoSub other than ... probably DOS BASIC apps and not Visual Basic apps. ... as they had never worked with a BASIC language before and had little or no ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6, VB2005, or Something Else?
    ... ¤ Couldn't the same be said of those who don't use GoSub? ... Since GoSub is part of the language ... Generally code posted in the forums are short secuences to solve certain ... Just like C programmers looked down upon VB programmers. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6, VB2005, or Something Else?
    ... ¤ Paul, ... But if you're using several GoSubs in a Sub or Function then it's spaghetti code and I'm not ... The ability to write bad code is not an excuse to use GoSub. ... ¤> Not sure how you can say the majority of serious programmers used GoSub. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6, VB2005, or Something Else?
    ... ¤> interested. ... The ability to write bad code is not an excuse to use GoSub. ... Other langauges do support nested procedures and logically a nested ... If there is an advantage to using it in place of a Sub or Function ...
    (microsoft.public.vb.general.discussion)

Loading