Re: Paranoid about style/elegance and function size, please quell
brangdon@cix.co .uk (Dave Harris) wrote in message
news:<memo.2003 0702204926.3391 1D@brangdon.mad asafish.com>...[color=blue]
> E.Robert.Tisdal e@jpl.nasa.gov (E. Robert Tisdale) wrote (abridged):[color=green]
> > Procedural programs are difficult to analyze and practically
> > impossible to prove correct. You should avoid procedure calls (and
> > assignment statements) whenever possible.[/color][/color]
[color=blue]
> Right. And you should make sure no-one confuses a procedure with a
> function. One way to achieve that is to make sure functions never have
> side effects and procedures never return results.[/color]
So what do you do with rand()? (I like the rule, but there are
exceptions.)
--
James Kanze GABI Software
mailto:kanze@ga bi-soft.fr
Conseils en informatique orientée objet/
Beratung in objektorientier ter
Datenverarbeitu ng
11 rue de Rambouillet, 78460 Chevreuse, France, Tél. : +33 (0)1 30 23 45
16
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
brangdon@cix.co .uk (Dave Harris) wrote in message
news:<memo.2003 0702204926.3391 1D@brangdon.mad asafish.com>...[color=blue]
> E.Robert.Tisdal e@jpl.nasa.gov (E. Robert Tisdale) wrote (abridged):[color=green]
> > Procedural programs are difficult to analyze and practically
> > impossible to prove correct. You should avoid procedure calls (and
> > assignment statements) whenever possible.[/color][/color]
[color=blue]
> Right. And you should make sure no-one confuses a procedure with a
> function. One way to achieve that is to make sure functions never have
> side effects and procedures never return results.[/color]
So what do you do with rand()? (I like the rule, but there are
exceptions.)
--
James Kanze GABI Software
mailto:kanze@ga bi-soft.fr
Conseils en informatique orientée objet/
Beratung in objektorientier ter
Datenverarbeitu ng
11 rue de Rambouillet, 78460 Chevreuse, France, Tél. : +33 (0)1 30 23 45
16
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
Comment