Rob,

First of all I don't know where you are getting O(n) from because the operation is O(1).
Secondly, I just don't understand what the sudden necessity for the goto construct is when over the years we have barely ever had a PHP developer asking for it.
And please guys, don't use C optimization comparisons as an example. This doesn't apply to PHP...


Andi

At 11:49 AM 7/30/2004 -0400, Robert Cummings wrote:
On Fri, 2004-07-30 at 06:05, Lester Caine wrote:
> Edin Kadribasic wrote:
>
> >> However, I think before talking about implementation, we need to
> >> decide if goto is really good for PHP.
> >
> > As I mentioned earlier, goto is one of the few features that I really
> > missed in the language for the past several years I've been using PHP.
> > We can debate until the end of time about it, but the fact is that it
> > can be a very useful tool.
>
> As long as it is not also a useful tool for hacking - GOTO -> backdoor!
>
> Personally I see NO advantage to GOTO in a structured language, and even
> if it is added I've learnt enough in 30 years to avoid it. Surely CASE
> is much safer and naturally 'contained'?

As I mentioned in an earlier post, regardless of what you can do with
case statements to emulate goto, why should I have to write O(n) code
because some newbie can shoot himself in the foot, or some zealot can't
get past the demonized goto construct of the ancient basic language.
There's absolutely nothing unclear about using goto to jump to a named
label within the owning function or method. It's definitely a lot
clearer and elegant then setting up a bunch of flags, or break N levels
out of while loops. Besides if you can make an argument for not having
goto, then why not make an argument for not having variable variables,
or variable function names. Come on, newbies can shoot themselves in the
foot with those too, and yet I haven't heard much in the way of
complaint.

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

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



Reply via email to