[fpc-devel] Re: [fpc-l] type discussion

Jamie McCracken jamie-junk at blueyonder.co.uk
Sun Jun 5 12:09:38 CEST 2005


Hans-Peter Diettrich wrote:

>>Not at all; I certainly don't indent them, and I'm a fanatical
>>indenter.
> 
> 
> Agreed. I really can't understand why some people indent like this:
>   if ...
>     then
>       begin
>         ...
>       end
>     else
>       if
> ...

lol - thats not what I meant. If you want readable code you indent 
inside the begin..end blocks ergo the begin..end syntax becomes 
redundant cause its the indentation that provides the visual cue.


> Two cons for reference counting:
> - It fails on circular references. Fatal :-(

Its not a black or white issue IMO its a shade of grey. At the end of 
the day you have to make a judgement call based on the facts. Im 
asserting that with non-component objects the incidence of cycles is so 
rare that provided we have a means of adding weak refs so that 
knowledgable developers can overcome them when they do occur then the 
issue of cycles can be ignored - after all if the probability of leaks 
is based on a one in a million occurance of a cycle (Im not saying thats 
an accurate probability!) coupled with an ignorant or naive developer 
then thats an acceptable risk to me. If it turns out that cyclic 
occurances are far more common than that then yeah that could be a 
killer. There are of course workarounds but I dont like any of them - EG 
python 2.3 does ref counting but also uses a mark sweep GC to mop up 
cicrular refs but I really dont think we need to consider that.


jamie.




More information about the fpc-devel mailing list