Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Jamie McCracken
Marco van de Voort wrote: The best solution I can think for this is to reference count non-component classes. This should be safe for TObjects but obviously not for Tcomponent descendants (cf circular reference problem) so a protected variable could be added to TObject to specify whether to

Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Florian Klaempfl
Jamie McCracken wrote: Marco van de Voort wrote: The best solution I can think for this is to reference count non-component classes. This should be safe for TObjects but obviously not for Tcomponent descendants (cf circular reference problem) so a protected variable could be added to TObject

Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Marco van de Voort
Marco van de Voort wrote: The best solution I can think for this is to reference count non-component classes. This should be safe for TObjects but obviously not for Tcomponent descendants (cf circular reference problem) so a protected variable could be added to TObject to specify

Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Jamie McCracken
Marco van de Voort wrote: 2. For Each. Its in Delphi 2005 and every modern language implements it. Yeah, and I still wonder why. There is nothing to gain with it. one less variable to manually declare Implement something in lazarus that auto-adds the variable to the local var section. No need

Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Jonas Maebe
On 23 feb 2005, at 14:04, Jamie McCracken wrote: My mistake it actually avoids initialising the loop variable rather than not declaring it: for i in myarray do myarray[i] := 0; as opposed to for i := low(myarray) to high (myarray) do myarray[i] := 0; I think the for..in is much clearer and

Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Marco van de Voort
My mistake it actually avoids initialising the loop variable rather than not declaring it: for i in myarray do myarray[i] := 0; as opposed to for i := low(myarray) to high (myarray) do myarray[i] := 0; I think the for..in is much clearer and more compact (it works for

Re: [fpc-devel] Modernising Pascal

2005-02-23 Thread Mattias Gaertner
On Wed, 23 Feb 2005 13:45:51 +0100 (CET) [EMAIL PROTECTED] (Marco van de Voort) wrote: one less variable to manually declare Implement something in lazarus that auto-adds the variable to the local var section. It already exists. Example: i:=0; Place cursor on i and press Code Completion