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 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 will >> ha

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Matijn Woudt
On Mon, Feb 6, 2012 at 11:34 PM, Tim Streater wrote: > On 06 Feb 2012 at 20:51, Simon J Welsh 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 se

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 fun

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 3:44 PM, 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 bef

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 f

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 $IsErr

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 11:07 AM, Daniel Brown wrote: > On Mon, Feb 6, 2012 at 12:59, Larry Martell > 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, integrat

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Daniel Brown
On Mon, Feb 6, 2012 at 12:59, Larry Martell 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. And, having contr

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 10:13 AM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 12:09 PM, Larry Martell > wrote: > >> >> 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 anythi

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 12:09 PM, Larry Martell wrote: > > 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 was told. I was also t

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 9:50 AM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 11:28 AM, Larry Martell > wrote: > >> On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams 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

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 Williams 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, pe

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 11:28 AM, Larry Martell wrote: > On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams 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, et

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 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 any GOTO

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Larry Martell
On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams 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 earlier

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 ha