On 2014-22-04 15:26, Trevor Vaughan wrote:
I'd like to say that I certainly don't want to do stupid things but I'll
all about doing strange things that work for what I need to get done.


I realize, that what I wrote was a bit unclear. I did mean that 'calling create resource from within the template code itself (which is the equivalence of using resource expressions in a puppet based template)' is just as horrible irrespective of language. That was the bad thing to do that I pointed out.

Totally understandable that working around problems requires using some strange solutions from time to time.

- henrik

Trevor


On Tue, Apr 22, 2014 at 8:48 AM, Henrik Lindberg
<[email protected] <mailto:[email protected]>>
wrote:

    On 2014-22-04 10 <tel:2014-22-04%2010>: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 puppet-dev+unsubscribe@__googlegroups.com
    <mailto:puppet-dev%[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/__msgid/puppet-dev/lj5ofk%24kqb%__241%40ger.gmane.org
    
<https://groups.google.com/d/msgid/puppet-dev/lj5ofk%24kqb%241%40ger.gmane.org>.

    For more options, visit https://groups.google.com/d/__optout
    <https://groups.google.com/d/optout>.




--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected] <mailto:[email protected]>

-- This account not approved for unencrypted proprietary information --

--
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]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVAe6N_qY%2BVLGzaN223RKGZh5rj0VxRN4cTavKMrRObMA%40mail.gmail.com
<https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVAe6N_qY%2BVLGzaN223RKGZh5rj0VxRN4cTavKMrRObMA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
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/lj75v7%243jk%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to