Hehe yeah I stopped caring about indentation a long time ago. I hit the tab key and then go with whatever VS Code gives me.
We'll see how much attention I will give the runtime version of SymbolicNim now that I've got the SymEngine wrapper running. No need to reinvent the wheel for that. Focus will instead be on the possibilities of a completely compile-time version. Will start digesting mratsim's link soon. It's crazy hot here as well so I might have been thinking equally crazy when I wrote it 😜 But evidently your code is less crazy than mine. I'm a practical coder, functionality before clean code. So you could probably get a halftime job reviewing and prettifying my code 😂 Your halfInteger proc is cleaner than mine. No doubt! (The rest as well). I basically just put into words how I wanted it to function (if that or that, return true , else false) but it could be simplified of course. In the contains proc the first if-branch is completely redundant as you have noticed, you just forgot to copy the `return false` part if no match was found. Your survey proc is also much cleaner. The reason I did it that way was because it was an improvement over an even worse version where I manually assigned an index to each type. (Later found I could have used ord() to get the int or even better use the enum itself as the key). In the last piece of code I was a bit unsure whether or not Nim's case statements is like that of other languages' switch statements that one has to break them manually so I just put them in for safety. But I could have settled with just removing the returns, right? You featured a thing that I'd like to use more there, assigning and returning the outcome of a block of code. That's something I've used a lot in my SymEngine wrapper as I have to use templates instead of procs because of memory allocation in the C library. Thank you for your advices :D will replace them tomorrow and push it. I could probably replace a lot of the ugly function calls in the diffFuncCall with just plain operators as well (something I couldn't do in my old implementation).