Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

why not an alternative to a custom language #43

Closed
jtarchie opened this issue Jul 27, 2018 · 3 comments
Closed

why not an alternative to a custom language #43

jtarchie opened this issue Jul 27, 2018 · 3 comments

Comments

@jtarchie
Copy link

With the announcement of terraform 0.12 there are many extensions to the HCL configuration language.

It looks more like a programming language rather than a data configuration language.

HCL covers a domain specific language. It seems that the maintenance and building a programming language and DSL can be counter productive. For example, the breaking changes listed for hcl2.

What alternatives were looked at? For example, lua is a language designed for embedding and DSLs. Even nginx has an extensions to support (community provided) it.

From a purely educational level, I'd like to learn why hcl is still the supported choice.

@jtarchie jtarchie changed the title the difficulty of a custom language why not an alternative to a custom language Jul 27, 2018
@nbering
Copy link

nbering commented Jul 27, 2018

The very first paragraph of the Configuration Syntax documentation probably summarizes Hashicorp's stance on this.

I think there's also a large factor at play that Hashicorp has a whole fleet of tools, written in Go-lang, and having their own configuration language gives them complete control over the format from the ground up.

Tools that use HCL:

... and I'm sure there's others, by Hashicorp and the community at large.

Personally... I favour the JSON syntax for most projects since it allows me to quickly write tools that understand my configuration in almost any language... but as support for HCL expands, I definitely see some advantages to it's readability and the availability of the parser itself as an open source library.

@jtarchie
Copy link
Author

The DSL could be written in Lua as well. There are implementations specifically built for Golang integration.

@apparentlymart
Copy link
Contributor

Hi @jtarchie,

This seems like a Terraform question more than an HCL question. If you'd like to discuss design decisions for Terraform, please do so over in Terraform's repository.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants