Well, while we're ranting about stupid language design desisions...

I would like to dish out a special platter of hate for Puppet.

Well, not a programming language per se.

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.

One example of my hatred for Puppet:

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

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

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

So, let's say you create a Puppet "class" (not really classes in the OO or
mathematical sense, but that's a separate rant...):

  class foo(
    $owner  = "foo",
    $prefix = "/opt/foo",
    $config = "/etc/${prefix}",
  ) {

    file { $config:
      ensure => directory,
      owner  => $owner,
      mode   => 0600,
    }

    ...

  }

You'd expect this class to create a directory /etc/opt/foo (for storing
configuration files for your custom "foo" application).

But sometimes, Puppet might randomly set the value of config before it sets
the value of prefix.  So you'll mess up the permissions of the /etc
directory. With no warning (unless of course, you read the logs closely to
see what it did....  but the only errors you will see are when everything
else starts to fail).




Reply via email to