[asterisk-dev] Syntax for application parameters

Mark Michelson mmichelson at digium.com
Tue Jun 9 09:43:55 CDT 2009


Jared Smith wrote:
> Eliel and I started a vigorous discussion on the asterisk-dev IRC
> channel earlier today regarding the syntax for application parameters in
> the built-in help, and I'd like to open up the discussion for more
> members of the development community before we agree on a format.
> 
>>From what we've discussed this morning, it appears we have four
> different proposed versions of the syntax:
> 
> 1) Application([param1][,param2[,param3]])
> 2) Application([param1[,param2[,param3]]])
> 3) Application([[param1][,[param2][,[param3]]])
> 4) Application([param1][,[param2][,[param3]]])
> 
> In this case, we're talking about cases where each parameter is
> optional, and is not dependent upon any previous parameters.  (For
> example, param3 doesn't depend on param2 being set.)
> 
> I'll withhold sharing my personal opinions until you've had a chance to
> look over the proposted versions of the syntax above, so as not to taint
> your opinions.
> 

I like 2 the best since I think it is the most readable and consistently formatted.

Also 3 and 4 can allow for weird interpretations like:
Application(param1,,)
Application(param1,param2,)
that can't be made if 1 or 2 are strictly followed.

Mark Michelson



More information about the asterisk-dev mailing list