From 13a5f28c3569ad4da6d988c5a64e7aa8830e3f84 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Sat, 23 Mar 2024 12:16:38 +0100 Subject: [PATCH] Update coding.md --- about/coding.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/about/coding.md b/about/coding.md index 28e9a47..e9e38da 100644 --- a/about/coding.md +++ b/about/coding.md @@ -44,6 +44,7 @@ These are guidelines for code style and quality that we follow at UseTheSource. * use nullary ADT constructors as "enums", never strings. * use `loc` source locations as references, qualified names or general identifiers; to avoid strings, captured variables or other fancy usages of first class functions. * use relations over maps where possible, for future generalizability where suddenly the mapping is not many-to-one anymore. The underlying datastructures for relations gracefully expand. -* Staging before parametrization: introduce an intermediate datatype or relation instead of adding (higher order) parameters to introduce algorithmic variability. +* Staging before parametrization: introduce an intermediate datatype or relation instead of adding (higher order) parameters to introduce algorithmic variability. +* Positional fields of ADT constructors, when they have a `src` origin field are always ordered by their original position from left you right. The same holds for lists of ADT constructors; they remain ordered by their `src` field, unless the elements do not originate from the same source file anymore.