On 2013-08-05 1:49, Eric Sorenson wrote:
On Friday, May 3, 2013 2:46:27 PM UTC-7, henrik lindberg wrote:
Hi,
I have now finished the work on "ARM-3 Puppet Templates" - the proposal
is here:
https://github.com/puppetlabs/armatures/blob/master/arm-3.puppet_templates/puppet_templates.md
<https://github.com/puppetlabs/armatures/blob/master/arm-3.puppet_templates/puppet_templates.md>
Hi Henrik, I am pretty excited about this change but I have a couple of
questions, for you or for the general audience.
Great. Everyone I talked to about this have been positive too.
Do you think it will be desirable to phase out/deprecate ERB templating?
Or would Puppet benefit from supporting two templating languages?
Don't see a phase out happening near term since there are many modules
that contains ERB templates as well as inline templates to evaluate Ruby
code.
Also EPP does not offer an alternative to inline ERB template being used
as a kind of quick "embedded ruby function" (because it is too much work
to write a real puppet function and they all live in one global name space).
So - as far as templating goes (produce text), yes, the ERB support
should be phased out. It will take time, and I think more work is needed
to support functions/lambdas/logic in a good/convenient way (Have no
concrete proposal in this area yet).
Seems like on the one hand it's nice to be more consistent language-wise
and not force users to shift mentally (`$var` in Puppet vs `var` in ERB
has caused me much head-scratching in the past!) but if there are things
that people need to do in templates that aren't in the DSL's vocabulary
it would be a loss.
There are several benefits: consistent language / idioms, protection
against "executing inside the puppet runtime", portability (at some
point the underlying parser/evaluator may be written in some other
language).
I have a hard time imagining that EPP makes anything impossible to do
since you can call out to functions, and functions can do anything, and
we now support iteration. It is just a better separation of concerns.
EPP templating is about producing text, not a way to sneak in functions.
If you want to try out the implementation, you need to pull it from my
branch (shown above) and then run with the setting --parser future
I will try it out and let you know how it goes.
cool.
- henrik
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.