Issue #11911 has been updated by Henrik Lindberg.

I disagree, the construct "${}" currently has the meaning interpolate 
expression value, and where a bare word is shorthand for variable. i.e. "${a}" 
is shorthand for "${$a}" - any expression is allowed "${$a + $b}" means add $a 
and $b and make a string of the result.

I would rather reserve the ${ } syntax for a future lambda construct (unnamed 
function) - i.e. a block of code that can be evaluated. (This fits well with 
the use in string interpolation where the current meaning can be expressed as 
"interpolate the result of evaluating this lambda taking no arguments". 
(Lambdas would be really neat in combination with collection support).  Thus $x 
= ${a} would mean that $x is a code block that needs to be evaluated (and it 
evaluates to the value of $a). 
----------------------------------------
Bug #11911: Variables with {} should always work
https://projects.puppetlabs.com/issues/11911#change-73124

Author: Hunter Haugen
Status: Accepted
Priority: Normal
Assignee: 
Category: language
Target version: 
Affected Puppet version: 
Keywords: variable, variables, curly, braces, brackets, parser
Branch: 


This works: `$variable`

This works: `"${variable}"`

This fails: `${variable}`

It would be more consistent for curly braces/brackets `{}` around variables to 
work both inside and outside of double-quotes.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to