Properties ordering constraint #605
Unanswered
sky-ruiroque
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Object properties are not inherently ordered in Pkl. Any reflection of definition order in evaluated output is an implementation detail. Off-hand, I can't come up with a viable way to assert on property order, even with using Can you say more about why this is desirable? Would you want this enforced on class/module declarations? At class/module amend sites? Both? If ordering is important, can you use a |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to guarantee that a given object has all properties alphabetically ordered?
For example:
How can I do something that if I insert a new property that breaks the ordering:
Then the evaluation will give an error, forcing me to sort the properties correctly:
Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions