[Asterisk-Dev] Function format
Leif Madsen - Certified Asterisk Consultant
asterisk.leif.madsen at gmail.com
Tue May 17 17:04:55 MST 2005
On 5/17/05, Tilghman Lesher <tilghman at mail.jeffandtilghman.com> wrote:
> As soon as you nest that deep (3 or more levels), it's going to look
> ugly, no matter what the syntax. It's not that big a deal; move on.
I disagree. By having curly braces you end up up doubling the number
of closing braces required. While I'm not a parsing expert in
Asterisk, I believe something like the following would be easier to
read:
Original:
exten => 100,n,Goto(${IF(${EXISTS(${DB(foo/bar)})})}?:novalue)
Proposed(?):
exten => 100,n.Goto(%IF(%EXISTS(%DB(foo/bar)))?:novalue)
You end up with half the number of closing braces, and is much easier
visually on the eyes.
--
Leif Madsen
http://www.leifmadsen.com
More information about the asterisk-dev
mailing list