[fpc-pascal] The reason why linus torvalds hate-pascal
    mm 
    m2 at ellipsa.net
       
    Sun Apr 20 01:41:49 CEST 2008
    
    
  
Zaher Dirkey a écrit :
> I hate exit when i try to improve a procedure
> 
>  some code
> if (b) then
> exit;
>  some code
> 
> for long procedures i cant notice exit here and add some resource or memory uses
> 
> AnObject := TAnObject.Create;
> try
> 
>  some code
> 
>  if (b) then
>    exit;
> 
>  some code
> 
> finally
>   AnObject.Free;
> end;
> 
> Now Exit leave the procedure without freeing "AnObject".
> We need a new Exit keyword to jump to Finally section (I do not think
> Abort is useful here).
But AnObject is freed. If ever Exit had the behaviour you describe, we
would have a big problem.
mm
----
http://www.ellipsa.net/
    
    
More information about the fpc-pascal
mailing list