Order of precedence in G'MIC

As G’MIC is basically C++ interpreter, it should follow C++ order of precedence convention, right? I think it is, but I want to make sure as I’m working on cleaning gmic-community code to make it more maintainable.

Here is C++ order of precedence - C++ Operator Precedence - cppreference.com

It does, that is the exact page I’ve used as a reference when I’ve implemented the math parser.

1 Like

Thanks, on behalf of the community. Could you also indent the code? I have trouble reading it otherwise. Trickier to navigate because people have different preferences.

I actually think that can be completely automated. I will try to indent code. Also, you could also criticize my code as well in terms of stylistic errors as that is my focus.

In general, your code is too chunky, like having whole unchopped potatoes in soup, which I have to chew through. By that I mean you could reduce it to smaller components (e.g., sub-commands, macros, sections with comments). Not too small though because that would also degrade the readability. E.g., I have trouble reading Python because there are too many tiny defs scattered throughout multiple files and in random order.

1 Like

Thank you very much. I applied those criticism to the CLI side of thing. I just hope that they don’t break since I don’t have G’MIC 3.1 for Paint.NET yet, neither I can update Krita G’MIC as I used to.

So, I edited blindly, and hope for the best.

See commit here: