Picking up discussion of this ARM, now that I've found time to look deeply 
at it.

This may be silly, but "Extended Puppet Templates" seems more logically 
abbreviated "EPT" - why "EPP"?

Could you include a link to the Puppet DSL in the text?  It's easy to think 
that that means Puppet itself (e.g., resource declarations), when really it 
is a form of Ruby (I think).  The link will add context.

The paragraph beginning with "Also note that it is not possible" is 
confusing since template parameters have not yet been introduced at that 
point in the text - perhaps move it down to the next section?

"If someone chooses to use these questionable expressions inside a 
template, there is no real harm; only poor design." -- I think we will want 
to validate for this at some point, and it will be much easier to do so if 
the documentation said "DO NOT DO THIS" from the beginning, rather than "Go 
ahead, but it's poor design".

As for @ vs. $ -- how difficult would it be to write erb2epp.rb to do the 
search-and-replace in a syntax-sensitive fashion?  If that's just an hour's 
hacking, then it might be a very useful addition, especially when ERB is 
deprecated.

As for validation of filetypes, I think this is a good idea, but I don't 
like the <%- ($x, $y) :html -%> syntax for this.  I'd prefer something a 
little more explicit and expandable, perhaps
<%- ($x, $y) syntax => html -%>

As for scope, I think that the fact that ERBs inherit their invoker's scope 
is a source of bugs and unintentional use of scoped variables.  However, 
restricted scope would make it more difficult to convert ERBs.  Ideally, 
this would be an option to the EPP functions, defaulting to restricted 
scope, so that conversion from ERB to EPP involves explicitly adding that 
option and only removing it when all variables are passed.  Your comment 
indicates that's difficult, though, so I'd leave it to you to measure the 
effort vs. future-proofing tradeoff.

Finally, it'd be nice to see a fully worked example with some iteration 
over lists, conditionals, and maybe some small Ruby tricks like shuffling 
lists or mapping.  The only lengthy code example is illegal.

Most of these suggestions concern the text of the ARM itself.  I haven't 
looked at the implementation, but assuming it works as advertised, I'm 100% 
in favor of this.

Dustin

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to