dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Read errors

Re: Read errors

From: Linus Nielsen Feltzing <>
Date: Thu, 13 Mar 2003 20:42:23 +0100

Mike Holden wrote:
> Maybe a better construct would be to define 2 macros, called success() and
> failure() which do a bit of hidden "magic" to make the code more readable.

Absolutely not! That kind of "hidden magic" is against everything my
coding philosophy stands for. I want things visible in the code. Keep It
Simple Stupid.

> That way you can write "if (success(somefunction()))", which is way more
> readable than "if(somefunction())" where somefunction() returns 0 for
> success.

I don't agree. I think the latter is way more readable, because it shows
what is going on, instead of hiding it in a hard-to-debug macro.

A simple comment may be in place, however.

Received on 2003-03-13

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