in reply to Re: Go to?
in thread Go to?

Making blanket statements that goto is evil suffers from the dangers of Cargo Cultism.

This is not to say that there isn't wisdom encapsulated there, but if it's learned behavior by ROTE rather than comprehension then the inherent wisdom is lost.

goto, like a gun - isn't evil. It's what you do with it that counts.

I'll not belabor the point already stated clearly by others.

That being said - I haven't had a reason to use goto in perl personally. I'm intrigued by the prospect and I want to know more.

That being said - I don't know if the OP has clearly stated what that reason is in his case. Rather they've been focusing on fending off the initial kneejerk reaction. That reaction however should have been expected.

I don't see that it's necessarily wrong to question the motivation behind the choice however, since it's something that cuts against the grain of the party line concerning 'structured programming'. What I mean by that is simply that for those of us who started programming with a flavor of BASIC and then moved on to other languages, or who took an academic journey to become programmers - we have been taught that using goto is usually a sign that you're doing something 'wrong'. If nothing else it's a sign that you should be thinking about what you're doing very carefully - and the OP is clearly doing that.

Ronnie can you please elaborate on the subject?



Wait! This isn't a Parachute, this is a Backpack!

Replies are listed 'Best First'.
Re^3: Go to?
by McDarren (Abbot) on Apr 06, 2006 at 03:00 UTC
    Making blanket statements that goto is evil suffers from the dangers of Cargo Cultism.

    I couldn't agree more!
    By the way, who was it that said that goto is evil? (certainly not me)

    but if it's learned behavior by ROTE rather than comprehension then the inherent wisdom is lost.

    My sentiments exactly.

    I might also add that making assumptions (and drawing conclusions) about one's level of knowledge and experience based on minimal evidence often does the recepient no justice at all, and in some cases can cause hurt and resentment - which does nobody any good.

    But it's okay, because I'm not the type of person to take any of this personally :)

      By the way, who was it that said that goto is evil?

      Edsger W. Dijkstra in the classic paper "Go To Statement Considered Harmful" published in March 1968. This short paper is widely considered the seminal work which began the Structured Programming movement. (what do they teach in schools these days? :-) )

        Which is to say, Dijkstra said it was worse than his contemporaries thought it was at the time. He's also said since then that he thinks it's better than today's zero-tolerance. There are places where goto really is a good way to solve something.

        ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

A reply falls below the community's threshold of quality. You may see it by logging in.