Re: Long Live GOTO
| From: | Adam Richardson | Date: | Mon, 06 Feb 2012 09:25:48 +0000 |
| Subject: | Re: Long Live GOTO | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316468@lists.php.net to get a copy of this message | ||
On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater <tim@clothears.org.uk> wrote:
> On 06 Feb 2012 at 07:47, Adam Richardson <simpleshot@gmail.com> wrote:
>
> > While not purely focused on PHP, I toss this out to the group because I
> > believe there are some novel, interesting points regarding the potential
> > benefits of using the goto construct as implemented in PHP:
> >
> >
> > http://adamjonrichardson.com/2012/02/06/long-live-the-goto-statement/QÙ
;
> > ×ñ�N¤!Ja
>
> Your val_nested() function looks like a straw-man to me. I've not used a
> goto since I stopped writing in FORTRAN in 1978, and not missed it [1].
> Neither do I ever have deeply nested if-then-else - these are a good source
> of bugs. I suppose the rest of your article might have been dealing with
> simplifying val_nested() but TBH I wasn't interested enough to find out.
>
I disagree that the nested function is a straw-man. I (just as the other
authors I'd linked to describing the "arrow" pattern of code) have seen
plenty of examples of similar code.
PHP provides a restricted implementation of the goto construct that, in my
opinion, can hold great value for developers.
Thanks for the feedback,
Adam
--
Nephtali: A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com