news.volyx.in

Apple releases Pkl – configuration as code language (pkl-lang.org)

433 points by isodev · 927 days ago · 7 comments on HN

Article summary

Apple has released Pkl, a configuration as code language that allows users to define their data in a single format and generate output for various configuration formats such as JSON, YAML, and Property Lists. Pkl is designed to be programmable, scalable, and safe, and can be integrated into applications for runtime configuration. The language also features a rich type and validation system to catch configuration errors before deployment. Pkl has IDE integrations and a language server for easy editor integration.

Main themes

  • configuration as code
  • Pkl language
  • JSON and YAML generation
  • runtime configuration
  • IDE integration
  • configuration errors
  • complexity management

What commenters say

  • Using a new syntax to generate JSON and YAML may be unnecessary for simple tasks, but can be beneficial for large and complex configurations.
  • Some companies have massive files and a large number of files, making a configuration as code language like Pkl useful.
  • The problem of growing size and complexity of configuration files, such as OpenAPI and YAML spec files, exists and may be addressed by Pkl.
  • Learning a new syntax may not be worth the complexity for small-scale configurations.
  • Pkl's ability to catch configuration errors before deployment can be a significant advantage.
  • The usefulness of Pkl depends on the specific use case and the complexity of the configuration files.
  • Pkl's integration with various programming languages and IDEs can make it a convenient tool for developers.