Apple has launched PKL, a new open source “integrable configuration language”, hoping to take the stress out of “small to large, simple to complex, ad hoc to repetitive configuration tasks.”
Released on February 1, 2024 in version 0.25, the tech giant's team has provided a 'quick tour' of the language in a text publication in the PKL documentation website.
According to that walkthrough, Pkl is designed around a key-value structure, similar to JSON, rather than imperative statements like many other traditional statements. programming languages, Apple has designed Pkl to specialize in settings, along with some interesting quality of life features that will catch your eye. In fact, Pkl supports JSON, XML and YAML property lists at launch to generate static configuration files.
But wait, there is more
However, PKL wants to be more than just a help in your setup process and claims that Pkl can be considered on its own as a “safe, easy and pleasant to use” configuration library. Although it's only been four days, as of this writing, since the release of the first version of Pkl, there are languages available for Jafa, Kotlin, Swift, and Go, and more are, hopefully, on the way.
“In the future, we hope to add support for other popular languages and platforms, realizing our vision of a polyglot configuration solution based on a single configuration language.”
Apple seems very excited about something so specific, but I guess it's good for them. It seems like a novel way to introduce a programming language, so even if we don't talk about PKL in many years the same way we do Piton (which you should learn, actually, since it's surprisingly realistic and very versatile), we can at least note here, now, that it's a creative solution to what I'm sure is someone's problem somewhere.
Hello, Apple Marketing, can you hear me?
Yes, okay, this is Very specific things, but for something to be successful, it helps to have a unique name or acronym. 'Pkl' is cute, we all like pickles, and to be fair, it's easily memorable for that reason. But will anything in this niche ever supplant the dreaded Google SEO for the Pro Kabaddi League, or a UK venue that fixes your kitchen? Only time will tell.
So far, just searching for 'pkl apple', which I only knew how to do because this story was on our news list when I stumbled in this morning, I get what we've all been waiting for: the github page for the language, which contains a link to the relevant documentation for Getting started with the PKL command line interfaceavailable on macOS, Linux, Alpine Linux and Java.
While Java will ensure cross-platform support, this comes with caveats: “it requires a Java 8 (or higher) runtime in the system path, has a noticeable startup delay, and runs complex Pkl code slower than native executables.”