Open uqs opened 3 years ago
I've always disliked using json for the config as well. I've messed around with other options in the past but have never gotten anything satisfactory to work.
I'm also very focused on mantaining backwards compatability.
I think the biggest improvment would to use an actual modern code editor input with auto complete instead of the plain text field we have now.
While an editor might help a bit with the syntactic non-sense that is JSON, it still wouldn't allow for comments unless some JSON superset is being used (which would help with being backwards compatible).
I think that supporting 2 different "config languages" shouldn't be too hard, though ideally you would differentiate them by filename extension or something so that you don't have to try and parse them twice all the time. One of them would have to compile to the other though ...
Hi there
I would really like to add comments to the recipes that I'm writing, because, well, d'uh I'm not going to remember in 6 months why a certain construct was added and websites change all the time, so documenting the input/output of rules seems super critical.
Also, I absolutely hate JSON (syntax error for trailing commas, really? double quotes for everything?), but that's probably a weaker argument.
As the engine expects JSON, I guess an easy fix would be to use something better, like https://jsonnet.org/ that can compile to JSON, so the internal changes would likely be minimal. How to do that in PHP is another question though, maybe it needs to fork/exec jsonnet or something.
But really, any other alternative that allows for code comments should be fine and preferred over JSON. I just happen to have 10 years of experience with the inspiration of jsonnet, so I'm biased in that direction.
Cheers! Uli