- Pkl (जिसका उच्चारण Pickle है) configuration जनरेट करने के लिए एक programming language है, जिसे Apple ने आंतरिक रूप से इस्तेमाल किया था और अब open source बनाकर इसका पहला release घोषित किया है
-
"Configuration that is Programmable, Scalable, and Safe"
-
- JSON, YAML, Property Lists जैसी static languages में complexity बढ़ने पर सीमाएँ होती हैं
- Pkl का लक्ष्य static languages और general-purpose programming languages के बीच संतुलन बनाना है
Pkl क्विक टूर
- डेवलपर्स के लिए परिचित syntax और आसान learning के लिए इसमें classes, functions, loops, type annotations जैसी सुविधाएँ शामिल हैं
- Pkl files का उपयोग configuration schema परिभाषित करने और अन्य configuration data को define करने के लिए किया जाता है
- Pkl programs को YAML, JSON, XML जैसे सामान्य formats में आसानी से render किया जा सकता है
बिल्ट-इन validation
- डेटा का valid होना ज़रूरी है, और Pkl में type annotations का उपयोग करके validation हासिल किया जाता है
- Type annotations constraints को define कर सकती हैं, और असफल constraints evaluation errors उत्पन्न करती हैं
पैकेज शेयरिंग
- Pkl packages publish करने और projects में उन्हें dependency के रूप में import करने की सुविधा देता है
- GitHub Releases के ज़रिए packages को आसानी से create और publish किया जा सकता है, और projects के माध्यम से dependencies manage की जा सकती हैं
language bindings
- Pkl text output के रूप में configuration जनरेट कर सकता है और दूसरी languages में library के रूप में embed किया जा सकता है
- Pkl schema को target language की classes/structs में generate किया जा सकता है, और यह Swift, Go, Java, Kotlin आदि को support करता है
editor support
- लक्ष्य Pkl लिखने के अनुभव को बेहतरीन बनाना है
- IntelliJ plugin सहित JetBrains editors के लिए समृद्ध support प्रदान किया जाता है
- यह autocomplete, navigation, validation जैसी सुविधाएँ देता है, और Language Server Protocol को support करने की योजना है
अगले कदम
- Pkl के लिए विस्तृत guide, language reference, और GitHub Discussions के माध्यम से communication की सिफारिश की गई है
- Pkl उपयोग के उदाहरणों के लिए sample repository, CLI download, और editor plugin installation की अनुशंसा की गई है
GN⁺ की राय:
- Pkl configuration management की complexity को हल करने के लिए बनाई गई नई programming language है, और यह डेवलपर्स के लिए उपयोगी लगती है
- बिल्ट-इन validation और package sharing features code की reusability और maintainability को बेहतर बना सकती हैं
- विभिन्न languages के लिए bindings और editor support, Pkl को अधिक development environments में अपनाने योग्य बनाते हैं, जिससे डेवलपर्स configuration management को और आसानी से कर सकेंगे
2 टिप्पणियां
मुझे भी ऐसा ही लगा था, लेकिन इसमें Go binding है। लगता है Apple भी Go को काफी इस्तेमाल करता है.
apple/pkl-go: Pkl bindings for the Go programming language
Hacker News राय