On 2014-22-04 10:59, Simon Marechal wrote:
I think this is a great addition, as it will simplify a lot the thinking
about templates : no arbitrary side effects (like you have with
arbitrary ruby code), and, more importantly, explicit parameters. This
last feature is just great.

Great. Glad you like that.

I am however wondering why this is so, as it seems like such a bad idea ?

    "There is however no protection against users creating resources inside
    the template (nor if they do this via function calls to
    `create_resources`).
    There is also no protection against realizing/collecting resources."


We can add such protection - the cost is performance. While we do like protection against mistakes, there is a limit to what can be done to stop those that insist on using oddball constructs as there is always some other way to do strange things.

I also disagree with :

    If someone chooses to use these questionable expressions inside a
    template, there is no real harm;


But that's probably just a question of taste :)

Yeah, we really do not want people to do stupid things - hence pointing out that it is stupid (although it will not kill you). (People do things like this today, producing template text and calling create resources from ruby because they need both the resources and the text...).

Regards
- 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/lj5ofk%24kqb%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to