Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Nested functions

Re: Nested functions

From: Michael Sevakis <jethead71_at_sbcglobal.net>
Date: Mon, 26 Feb 2007 08:16:25 -0500

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_at_rockbox.org>
To: "Rockbox development" <rockbox-dev_at_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/
Received on 2007-02-26

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy