[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rockbox-dev
Subject:    Re: Nested functions
From:       "Michael Sevakis" <jethead71 () sbcglobal ! net>
Date:       2007-02-26 13:16:25
Message-ID: 016601c759a8$517be3c0$4401a8c0 () gateway ! 2wire ! net
[Download RAW message or body]

Guilty here! but I limit using it to small functions that are only needed by
another function (by definition really). I've found them to aid clarity when
used sparingly and they're better than macros for the same purpose since
they're scoped. Just plopping everything in globally can be worse imho. From
what I've seen I _think_ I'm the only one that has used nested functions.

As for multiple statements or use of the comma operator, same thing as far
as not going overboard and not on complicated expressions.

If either of those are ever stricty forbidden I'll of course change habits.

Mike

----- Original Message ----- 
From: "Daniel Stenberg" <daniel@rockbox.org>
To: "Rockbox development" <rockbox-dev@cool.haxx.se>
Sent: Sunday, February 25, 2007 5:09 PM
Subject: Re: Nested functions


> On Sun, 25 Feb 2007, Magnus Holmgren wrote:
>
> > Just curious about what the code police has to say about the use of
nested
> > functions (and multiple statements on one line).
>
> Personally, I think we should avoid both for clarity and readability.
>
> -- 
>   Daniel Stenberg -- http://www.rockbox.org/ -- http://daniel.haxx.se/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic