My opinion on Pkl (Apple's new configuration format)

Поділитися
Вставка
  • Опубліковано 24 лис 2024

КОМЕНТАРІ • 6

  • @_modiX
    @_modiX 9 місяців тому +1

    It's also valuable to me. Right now in a project I have to deal with a weird configuration whereas I have a JSON that needs to respect a common base JSON so that identical sub configurations don't cause redundant JSON. JSON itself is incapable to do this natively. Things had to get done, so I simply wrote a JSON merge routine at runtime that I will carry down specific things from the base. This sucks and pkl would've solved it. I will try to move my configuration over to have it compile a finished JSON without the need of any base JSON or runtime merge logic. pkl seems to be the perfect tool for that.

    • @manofacertainrage856
      @manofacertainrage856 9 місяців тому

      jsonnet is small and dedicated to json. It also has a one (not too long) page tutorial that enables easy learning.

    • @_modiX
      @_modiX 9 місяців тому

      @@manofacertainrage856 I heard about jsonnet and how awesome and feature rich it is, but the investment required to pick it up isn't justifiable for me, because at the end it still has JSON syntax. pkl on the other hand seems to work with more output formats and has a nicer syntax than JSON, so the motivation is a bit higher to pick it up and give it a shot. But yes, jsonnet is also a good choice.

  • @giuliopimenoff
    @giuliopimenoff 9 місяців тому

    Personally I wrote my own config library in Kotlin and I feel like if it's as powerful as pkl. You can write lambdas to validate data etc... I don't really see the need to bring in another language here but I like the idea

  • @egorandreevich7830
    @egorandreevich7830 9 місяців тому +2

    Nix, Nickel, Dhall, CUE, Jsonnet and HCL already exist

    • @manofacertainrage856
      @manofacertainrage856 9 місяців тому +3

      Jsonnet and Dhall are for JSON. HCL - Hashicorp CL - Terraform - which means the real equivalent is CDKTF. I can't find Nickel. CUE might be useful - nice call out.