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>
<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>
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.