3 ms·
This looks promising! I like that the template file also defines constraints at compile time, and that there is codegen to make it easy to work with pkl files w
by seabass 3y ago
This looks promising! I like that the template file also defines constraints at compile time, and that there is codegen to make it easy to work with pkl files well-typed in a decent variety of languages.
The tutorial is also nicely written. Props to Apple for writing really good docs on this one! The error messages it produces also look pretty good.
It would be nice if they added compiled equivalents of each code snippet from the tutorial in other formats, though, since it wasn't immediately clear how certain types (like `duration: Duration = 30.min`) would be represented in JSON.
If anyone at Apple is reading this, another thing that would make it much easier to evaluate and decide whether to adopt pkl would be to include an online compiler with a few built-in examples so that anyone can quickly see how the configuration is transformed without delving into the full docs.
- islon 3y agoThe community created a playground here: https://pkl-playground.vercel.app/ https://pkl-playground.vercel.app/ You can try it out and see what it generates.