Comment on Introducing Pkl, a programming language for configuration
abhibeckert@lemmy.world 9 months agoJson is a nightmare to write.
Compare this pkl code:
host: String port: UInt16(this > 1000)
To the equivalent in json-schema:
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "host": { "type": "string" }, "port": { "type": "number", "minimum": 1000, "exclusiveMinimum": true } }, "required": ["host", "port"] }
I think it’s pretty clear pkl is better.
itsathursday@lemmy.world 9 months ago
Nice