Re: changes to template variable syntax
Asheesh Laroia <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 7 Sep 2007, Will Guaraldi wrote:
> and now in addition to that, we're adding:
>
> $(foo)
>
> This change won't break existing templates.
I agree.
I still think that ${foo} is more shell-like, and that's a good thing.
In sh-style shells, $(foo) means "execute foo and grab its output, but
${foo_withWEIRDname} means get the variable foo_withWEIRDname. bash
introduced the parentheses thing as an alternative to backticks. The same
braces syntax rules apply for gettext variable replacement. PHP, God help
us, uses a similar syntax too. I personally have not seen a $(thing)
variable substitution syntax outside of the bash "run thing and get its
stdout" that I mentioned above.
I feel fairly strongly that ${foo} is better, but overall this is by no
means a big deal. So hopefully I can convince you to use braces, but if
not, then we'll still be friends and I'll still use your software and
everything.
-- Asheesh.
--
No woman ever falls in love with a man unless she has a better opinion of
him than he deserves.
-- Edgar Watson Howe
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/