Board index » cppbuilder » Goto never went away

Goto never went away


2006-02-06 11:52:06 PM
cppbuilder20
I must say the idea of top-down programming and the elimination of the goto
was a nice idea...
but I find that several levels of inheritance and calls to code all over
hells half acre was just a way to disguise the goto. It never really went
away. Object Oriented Goto lives on.
Anybody else feel this way. LOL
 
 

Re:Goto never went away

Larry Griffiths wrote:
Quote
I must say the idea of top-down programming and the elimination of
the goto was a nice idea...
What's wrong with top down programming and why are you linking it to
the use of goto?
Anyway goto wasn't eliminated. People just realised that it was rarely
appropriate. It still has a place in modern programming.
Follow-up set to .non-technical
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Goto never went away

With top-down programming you don't GOTO work coding until you figure it all
out.
When Im trying to fix code in our system, I GOTO here and GOTO there and
GOTO and GOTO and GOTO until I figure it out. :)
"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Larry Griffiths wrote:

>I must say the idea of top-down programming and the elimination of
>the goto was a nice idea...

What's wrong with top down programming and why are you linking it to
the use of goto?

Anyway goto wasn't eliminated. People just realised that it was rarely
appropriate. It still has a place in modern programming.

Follow-up set to .non-technical

--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

{smallsort}

Re:Goto never went away

Larry Griffiths wrote:
Quote
With top-down programming you don't GOTO work coding until you figure
it all out.
I know but that isn't neccessarily a bad thing. Obviously you need to
have some idea of what you want to achieve and how to achieve it but
bottom up programming can result in you providing functionality that
isn't actually needed. If the design turns out to be wrong you can end
up throwing away perfectly good code that is no longer needed. You can
also end up writing code that is never properly exercised (if it all)
and that has lingering bugs.
Top down programming encourages you to only code what's needed and
allows for more flexible implementation. Since it's coding 'on demand'
everything you write has a purpose and should be well exercised.
Both methods have their good point but I prefer top down. My usual
strategy is to start coding then when things begin to a look a little
complicated declare a function or class to deal with the complexity. I
don't actually implement the function or class at that point, though. I
just declare it, and use it. Eventually I get to the point where the
linker starts complaining and I just fill in the missing functions :)
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Goto never went away

"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Both methods have their good point but I prefer top down. My usual
strategy is to start coding then when things begin to a look a
little
complicated declare a function or class to deal with the complexity.
I
don't actually implement the function or class at that point,
though. I
just declare it, and use it. Eventually I get to the point where the
linker starts complaining and I just fill in the missing functions
:)
That's the way I like to do it. Work out the high-level logic first
and worry about the{*word*152}details later. With a bottom-up approach, you
might never make it to the higher levels.
--
Bruce
 

Re:Goto never went away

Bruce Salzman wrote:
Quote
That's the way I like to do it. Work out the high-level logic first
and worry about the{*word*152}details later.
I often find that when I finally get down to the{*word*152}details they are
a lot less{*word*152}than they originally looked. Quite often the code just
kind of falls out of the design. I suppose a classic case of divide and
conquer.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Goto never went away

Andrue Cope [TeamB] wrote:
Quote
I often find that when I finally get down to the{*word*152}details they are
a lot less{*word*152}than they originally looked. Quite often the code just
kind of falls out of the design. I suppose a classic case of divide and
conquer.
That usually happens when you have done some very good top-down design. The lower levels
become trivial. IMO, there is no science to good top-down system design - it is an art!
Some of us programmers should be compared to Da Vinci and Rembrandt for our achievements.
--
Mark Jacobs
www.dkcomputing.co.uk