Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a templating language #1040

Conversation

malcolmholmes
Copy link

The website describes Jsonnet as a "templating language". For a broader definition of "templating", this is correct. However, with templating tools such as Jinja or Helm around that treat structured data as flat text files, the term suggests that Jsonnet is less powerful than it is.

This suggestion arose from a conversation with a colleague who refused to use "another templating language". I'm suggesting this description harms Jsonnet, by limiting it.

Other possible descriptions:

  • a purely functional language (with OO features)
  • A powerful DSL for elegant description of JSON data
  • A powerful data rendering language

@google-cla
Copy link

google-cla bot commented Dec 1, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Contributor

@Duologic Duologic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this, it's a bit more up-to-date with how the ecosystem around jsonnet evolved.

@sparkprime
Copy link
Member

I wonder if we should just use "configuration language" at this point. The term "data templating language" dates back to 2014 when we were discussing how to describe to the outside world (i.e. not Google) what Jsonnet is for, because we felt that configuration language (which is what it was called inside Google) would not be easily understood externally. But I feel that now, the term is much more widely used outside of Google.

@malcolmholmes
Copy link
Author

"configuration language" works for me, just not "templating language"!!

@Duologic
Copy link
Contributor

Duologic commented Dec 7, 2022

I've been using jsonnet for testing and validation too, does that fall under 'configuration' in your point of view?

@sparkprime
Copy link
Member

Are you testing or validating configuration? :)

@Duologic
Copy link
Contributor

Duologic commented Dec 7, 2022

Not necessarily, it could validate JSON output from an API call piped into jsonnet.

My point is that 'configuration language' is still quite restricting for how powerful Jsonnet can be. Rendering configuration is one of the main features, by putting that in the initial tagline it might rule out any other uses prematurely, just like 'templating'.

@sparkprime
Copy link
Member

True, and I can see how a hermetic language would be a decent choice for testing / verification as well as configuration. Neither of those are really "rendering" either, though. Maybe we should single out configuration as the primary use case but also prominently draw attention to other use cases on the front page.

@rhowe
Copy link
Contributor

rhowe commented Feb 19, 2023

since this is a config language

#607 (comment)

:)

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

Successfully merging this pull request may close these issues.

None yet

4 participants