On 14/05/12 17:28 Luke Kanies wrote:
On May 14, 2012, at 9:06 AM, Robert Rothenberg wrote:

[Snip!]

But Puppet is special in that it's intended to be a *descriptive* language.
So you describe how your servers are to be configured.

Sounds nice, except... it has side effects. Which makes the whole
descriptive vs imperative thing to be worthless.

Hmm.  I don't see side effects anywhere, just stupid language stuff.

Well, putting on my language theorist's hat: if the language is descriptive,
then the interpreter should do exactly what is described. If unexpected
things happen (like variables sometimes being undefined/blank because of
non-deterministic evaluation order), then those are "side effects".

One example of my hatred for Puppet:

1. Execution order is non-deterministic. Well, not a problem, but…

Well, technically, the execution order of unrelated resources was, until 
recently, as random and inconsistent as the hashing algorithm in ruby.  It is 
now random (again, only for unrelated resources) but consistent across runs.

2. Evaluation order of parameters is also non-deterministic. Well,
  not as well documented, but is a bit more problematic because…

Hmm.  I was going to say that's not true, but that actually is true for the 
parameters in your example. (One of the stupidest parts of Puppet is the 
inconsistencies between types defined in the language, like below, and those 
defined in Ruby.)

Well, there's an outstanding request for a strict mode in Puppet.

Another idea would be to have it determine dependencies between parameters
based on variable interpolation, or even just to evaluate the parameters in
the order that they are specified.

I actually think that defaulting to the order that things are given in the
source code when there are no other dependencies is a good thing.

3. Undefined values are *silently* interpolated as empty strings!

I chose this because the shell does the same thing, and I figured sysadmins 
(our target user) would find it most convenient.  I think this is being 
reconsidered, but I'm not sure it doesn't actually make the most sense.  It's 
not up to me any more, though. :)

I can understand the decision, but I don't think it's good to replicate bad
behaviour on other systems, just because that's what users are used to.




Reply via email to