Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GitHub Actions originally supported HCL (Hashicorp Configuration Language) instead of YAML. But the YAML force was too strong: https://github.blog/changelog/2019-09-17-github-actions-will....


HCL is same s**, different smell. Equally hamstrung. It’s the reason hashicorp came out with an actually programmable version of the hcl semantics: CDKTF.


If you have worked with HCL in any serious capacity, you'll be happy they didn't go that route.

Here's some fun examples to see why HCL sucks:

- Create an if/elseif/else statement

- Do anything remotely complex with a for loop (tip: you're probably going to have to use `flatten` a lot)


Stuff like HCL and Ansible YAML makes me want to require mandatory training in Ant contrib tasks for developers creating them:

https://ant-contrib.sourceforge.net/tasks/tasks/if.html

  <if>
    <equals arg1="${foo}" arg2="bar" />
      <then>
      <echo message="The value of property foo is 'bar'" />
    </then>
    <elseif>
      <equals arg1="${foo}" arg2="foo" />
      <then>
        <echo message="The value of property foo is 'foo'" />
      </then>
    </elseif>
    <else>
      <echo message="The value of property foo is not 'foo' or 'bar'" />
    </else>
</if>

https://ant-contrib.sourceforge.net/tasks/tasks/for.html

  <for param="file">
    <path>
      <fileset dir="${test.dir}/mains" includes="*.cpp"/>
    </path>
    <sequential>
      <propertyregex override="yes"
        property="program"  input="@{file}"
        regexp=".*/([^\.]\*)\.cpp" replace="\1"/>
      <mkdir dir="${obj.dir}/${program}"/>
      <mkdir dir="${build.bin.dir}"/>
      <cc link="executable" objdir="${obj.dir}/${program}"
        outfile="${build.bin.dir}/${program}">
        <compiler refid="compiler.options"/>
        <fileset file="@{file}"/>
        <linker refid="linker-libs"/>
      </cc>
    </sequential>
  </for>
Yes, programming with them was as fun as you're imagining.


That looks so terrible, but they could have been so easily transformed into an S-expression language similar to Lisp:

    (if (equals foo "bar")
      (then (echo "The value of property foo is 'bar'"))
      (elseif (equals foo "foo")
        (then (echo "The value of property foo is 'bar'")))
      (else (echo "The value of property foo is not 'foo' or 'bar'")))
That’s not a Lisp-like language I particularly like, but it’s not flat-out insane like Ant appears to be.

Advocates for the inappropriate use of XML (basically, anywhere it was used as anything other than a markup language) have lot to answer for.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: