Re: Why doesn't JavaScript have a goto command?
In article <1141775714.827 842.176170@j33g 2000cwa.googleg roups.com>,
electrician@ele ctrician.com wrote:
[color=blue]
> <There is no logcal need for goto.
>
> The lack of goto forces you to think of the correct way to solve your
> problem, rather than relying on spaghetti code :)[color=green]
> >[/color]
>
> So what about those of us that like programming in spaghetti code? Who
> are you or the creators of JavaScript to force me to use their
> programming concepts? I like Goto and want it and have worked for
> hours to try something else when goto would have saved me precious
> time. This is another example of academia forcing us to use useless
> non productive time to preserve some higher than thou intellectual crap.[/color]
You are a fathead, aren't you (as we saw in your other thread). The goto
leads to unmaintainable spaghetti code, and as was pointed out in the
other thread, it becomes untestable too, so you can't guarantee its
gonna work properly in all conditions.
FORTRAN has a goto, he says. Sure - and I stopped using FORTRASH in 1978
- and that's also the last time I used a goto statement.
You need to get it into your thick skull that this has nothing to do
with "academia". It's called engineering. I want my software to:
1) work
2) be maintainable
3) be extendable
Spending some time making it properly structured and clean ("designing"
it might be the pompous academic word to use here snoot snoot) will pay
dividends down the road.
I once spent several hours working through some "spaghetti" code only to
find the klod had used a Fortran computed goto to implement subroutine
calls. So several pages of code could suddenly be condensed into perhaps
half a page. Buggered if I'm ever going to do THAT again.
-- tim
In article <1141775714.827 842.176170@j33g 2000cwa.googleg roups.com>,
electrician@ele ctrician.com wrote:
[color=blue]
> <There is no logcal need for goto.
>
> The lack of goto forces you to think of the correct way to solve your
> problem, rather than relying on spaghetti code :)[color=green]
> >[/color]
>
> So what about those of us that like programming in spaghetti code? Who
> are you or the creators of JavaScript to force me to use their
> programming concepts? I like Goto and want it and have worked for
> hours to try something else when goto would have saved me precious
> time. This is another example of academia forcing us to use useless
> non productive time to preserve some higher than thou intellectual crap.[/color]
You are a fathead, aren't you (as we saw in your other thread). The goto
leads to unmaintainable spaghetti code, and as was pointed out in the
other thread, it becomes untestable too, so you can't guarantee its
gonna work properly in all conditions.
FORTRAN has a goto, he says. Sure - and I stopped using FORTRASH in 1978
- and that's also the last time I used a goto statement.
You need to get it into your thick skull that this has nothing to do
with "academia". It's called engineering. I want my software to:
1) work
2) be maintainable
3) be extendable
Spending some time making it properly structured and clean ("designing"
it might be the pompous academic word to use here snoot snoot) will pay
dividends down the road.
I once spent several hours working through some "spaghetti" code only to
find the klod had used a Fortran computed goto to implement subroutine
calls. So several pages of code could suddenly be condensed into perhaps
half a page. Buggered if I'm ever going to do THAT again.
-- tim
Comment