On Thu, 2004-07-29 at 20:10, Andrey Hristov wrote:
> Robert Cummings wrote:
> > On Thu, 2004-07-29 at 17:25, Timm Friebe wrote:
> > 
> >>On Thu, 2004-07-29 at 04:12, Sara Golemon wrote:
> >>
> >>>I wrote up a patch for implementing gotos in php scripts a couple months ago
> >>>as an exercise in working with the Zend engine.
> >>
> >>[...]
> >>
> >>In the five or six year's I've been programming PHP, I haven't ever felt
> >>the need to have "goto". Neither have I seen a newsgroup posting related
> >>to it in the two years or so I followed the German PHP newsgroup,
> >>de.comp.lang.php.
> >>
> >>I don't think goto is really needed. People using other languages manage
> >>to do without it, too.
> > 
> > 
> > C has it
> Well, yes, C is very close the ASM, and ASM needs jmp-s.

And yet it isn't ASM.

> > C++ has it
> Yes, C++ was designed to be as close to C as possible. I think
> I read this in Straustrup's book. Thus C++ had to have goto.

Probably because C had a lot of good features. Isn't PHP also in many
ways modeled after C?

> > VB has it
> Yes, since it has it roots in Basic. Remember
> 10 Print "Hello"
> 20 Goto 10

I think, and I doubt I'm alone, that there a world of difference between
the classical goto syntax where you "goto" the line number and what is
now considered good goto practice by declaring a label and jumping to
it. Not only that but goto in modern practice is limited to where it can
jump by it's current scope (not sure if scope is quite the right word,
but you know what I mean).

> > Lisp has "GO" which is pretty much the same
> No experience with Lisp :)

I dislike LISP :)

> > Perl
> A language created by a hacker for hackers. I think Perl is quite
> famous for the unmaintable code.

Unmaintainable because of the ability to write cryptic code. There's
nothing cryptic about:

    ...code

    goto cleanup:

    ...code

    cleanup:

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to