[asterisk-dev] RFC - add this S_OR macro to strings.h ?

Luigi Rizzo rizzo at icir.org
Fri Mar 24 00:51:04 MST 2006


On Thu, Mar 23, 2006 at 01:53:14PM -0600, Kevin P. Fleming wrote:
> BJ Weschke wrote:
> 
> >  +1 - I think that's a cool idea.
> 
> I think it's a good idea as well, but I'm not keen on S_OR as the
> name... it doesn't lend itself to knowing what it does at all.
> 
> The name should be something that indicates it selects the first
> non-empty string from the arguments... whatever you can come up with :-)

hey, it's your turn to make suggestions :) I already tried to think
of different of names (e.g. S_NONEMPTY, S_IFELSE) but i couldn't
find one that was not too long _and_ explicative of what goes on
(remember one of the goals is to keep expressions short to improve
readability).

The reason I picked S_OR is that S is for String, OR as it really
mimics the behaviour of the || operator. S_? would be a better
name but the question mark is not permitted there...

In any case if the principle is acceptable, a name can be
changed easily.

cheers
luigi

> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list