[fpc-pascal] Nesting
Juha Manninen (gmail)
juha.manninen62 at gmail.com
Mon Sep 13 13:24:05 CEST 2010
A new Lazarus review :
http://delphimax.wordpress.com/2010/09/13/freepascal-and-lazarus-success-or-
failure/
has this comment about Lazarus source:
---
Abundant use of the Exit() command instead of nesting code in If/then/else. It
has been proven (last time in Delphi Informant Magazine) that allowing a
method to nest itself out makes faster code. It is also easier to read and
study. Exit should of course be used (it must be used in many situations) but
prudently.
---
Does nesting really create faster code?
For readability I like the nesting style, except when there are very many such
tests in one function.
Juha
More information about the fpc-pascal
mailing list