Issue #7606 has been updated by Nick Fagerlund.

Ixnay on curly braces for conditions! Curlies enclose blocks of "live" code; 
they hold words that **instantiate or modify** things. What you're wrapping 
here are words that **identify** things without directly affecting them. 

And we already use square brackets for that purpose in resource references. And 
references can be given blocks of attribute overrides the same way collections 
can:

    File['apacheconf'] {
        mode => 0640,
    }

In fact, if you think about it, they're really the same thing. 

* Collection of one: `File['foo'] { some code }` 
* Collection of several: `File['foo', 'bar'] { some code }`
* Collection of all: `File { some code }`
* Collection by search: `File[mode == 0644] { some code }`
    * Or something.

That's how I, intuitively, want it to look: just like all the other pieces of 
syntax it's exactly like. I'm not sure about edge cases, though -- like, how do 
we become totally sure that's not the name of the resource, and all that. 
----------------------------------------
Feature #7606: Spaceship operator too magical, hard to read
https://projects.puppetlabs.com/issues/7606

Author: Randall Hansen
Status: Investigating
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: puppetcamp-eu-2011
Branch: 


The spaceship operator:

    User <| group == sysadmin or title == luke |>

Is relatively easy to type but, if you don't know it, very hard to read.  We 
should consider a word-based syntax, e.g.:

    collect User { group == sysadmin or title == luke }
    User search { group == sysadmin or title == luke }

--

*This ticket is a request for comment, coming out of a discussion at Puppet 
Camp EU, 2011.  No promises whatever about implementation, but there were 
enough people interested to open a public discussion.*



-- 
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