[PHP] Re: Long Live GOTO

2012-02-06 Thread Jim Giner
NO GO! As one who started back in the 70's with old style coding that utilized GoTo in Cobol, Fortran, etc. and had to deal with spaghetti code written by even earlier developers who never considered that someone else would have to maintain their code, I feel strongly that GoTo is not to be

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Alain Williams
On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: NO GO! As one who started back in the 70's with old style coding that utilized GoTo in Cobol, Fortran, etc. and had to deal with spaghetti code written by even earlier developers who never considered that someone else would have to

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams a...@phcomp.co.uk wrote: On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: NO GO! As one who started back in the 70's with old style coding that utilized GoTo in Cobol, Fortran, etc. and had to deal with spaghetti code written by even

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Alain Williams
On Mon, Feb 06, 2012 at 09:28:10AM -0700, Larry Martell wrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams a...@phcomp.co.uk wrote: If I survey my code I find that I use one GOTO in about 4,000 lines of code - that I do not find excessive. There are, however, people who consider

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 11:28 AM, Larry Martell la...@software-horizons.comwrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams a...@phcomp.co.uk wrote: On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: NO GO! As one who started back in the 70's with old style coding that utilized

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 11:35 AM, Alain Williams wrote: On Mon, Feb 06, 2012 at 09:28:10AM -0700, Larry Martell wrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williamsa...@phcomp.co.uk wrote: If I survey my code I find that I use one GOTO in about 4,000 lines of code - that I do not find excessive.

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 9:50 AM, Adam Richardson simples...@gmail.com wrote: On Mon, Feb 6, 2012 at 11:28 AM, Larry Martell la...@software-horizons.comwrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams a...@phcomp.co.uk wrote: On Mon, Feb 06, 2012 at 11:12:53AM -0500, Jim Giner wrote: NO

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 12:09 PM, Larry Martell la...@software-horizons.comwrote: The source is my own personal experience working for an avionics company and working with the FAA to get our code certified under the DO-178B standard. I never saw anything that said 'no GOTOs' but that's what I

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 10:13 AM, Adam Richardson simples...@gmail.com wrote: On Mon, Feb 6, 2012 at 12:09 PM, Larry Martell la...@software-horizons.comwrote: The source is my own personal experience working for an avionics company and working with the FAA to get our code certified under the

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Daniel Brown
On Mon, Feb 6, 2012 at 12:59, Larry Martell la...@software-horizons.com wrote: I just pulled out my notes from that job - it took me 59 hours to do the conversion and remove the gotos and recursion, and another 67 hours for testing, verification, integration, documentation, and certification.

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 11:07 AM, Daniel Brown danbr...@php.net wrote: On Mon, Feb 6, 2012 at 12:59, Larry Martell la...@software-horizons.com wrote: I just pulled out my notes from that job - it took me 59 hours to do the conversion and remove the gotos and recursion, and another 67 hours

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Marco Behnke
Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in several different places (eg data validation, ...). But it is reading a file which needs to be closed before the function returns. I have seen code where some $IsError

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Simon J Welsh
On 7/02/2012, at 9:44 AM, Marco Behnke wrote: Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in several different places (eg data validation, ...). But it is reading a file which needs to be closed before the

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 3:44 PM, Marco Behnke ma...@behnke.biz wrote: Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in several different places (eg data validation, ...). But it is reading a file which needs to be

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Stuart Dallas
On 6 Feb 2012, at 20:44, Marco Behnke wrote: Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in several different places (eg data validation, ...). But it is reading a file which needs to be closed before the function

[PHP] Re: Long Live GOTO

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 20:51, Simon J Welsh si...@welsh.co.nz wrote: On 7/02/2012, at 9:44 AM, Marco Behnke wrote: Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a function that can fail in several different places (eg data validation, ...). But

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Matijn Woudt
On Mon, Feb 6, 2012 at 11:34 PM, Tim Streater t...@clothears.org.uk wrote: On 06 Feb 2012 at 20:51, Simon J Welsh si...@welsh.co.nz wrote: On 7/02/2012, at 9:44 AM, Marco Behnke wrote: Am 06.02.12 17:23, schrieb Alain Williams: However: a few GOTOs can make things clearer. Think of a

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Marco Behnke
Am 06.02.12 21:55, schrieb Adam Richardson: On Mon, Feb 6, 2012 at 3:44 PM, Marco Behnke ma...@behnke.biz wrote: Am 06.02.12 17:23, schrieb Alain Williams: many places to see if things should be done. That is just as bad as lots of GOTO -- often when having to write something like that I