puppetlabs / puppet-specifications

Specification of the Puppet Language, Catalog, Extension points
Other
99 stars 66 forks source link

(PUP-5662)Specify that hash has keys in insertion order #62

Closed hlindberg closed 8 years ago

peterhuene commented 8 years ago

:+1:

peterhuene commented 8 years ago

Looks like there's this in expressions.md

When matching against a Hash the keys are searched in an undefined order.

Although not sure why relevant, it would now be insertion order, correct?

hlindberg commented 8 years ago

good catch, will look at that as well

hlindberg commented 8 years ago

I updated the text. And since you gave thumbsup earlier I merged this.

The only possible relevance for the order (since in produces a boolean) is if you have an advanced reasoning about performance - it would take longer to answer if the last key is there than the first since the operation is sequential . What you would do with this piece of information is however unclear :-)

peterhuene commented 8 years ago

Sorry, didn't see it was updated. Posthumous :+1: